#include #include #include #include #include using namespace std; struct Point { int x, y; }; int s(Point& a, Point& b, Point& c) { return abs((c.y-a.y)*(b.x-a.x)-(b.y-a.y)*(c.x-a.x)); } struct Triangle { Point a, b, c; int s() { return ::s(a,b,c); } bool contains(Point p) { return s() == ::s(a,b,p) + ::s(b,c,p) + ::s(c,a,p); } void test() { a.x = 0; a.y = 0; b.x = 0; b.y = 3; c.x = 3; c.y = 0; Point p; p.x = 1; p.y = 1; cout << contains(p); p.x = -1; p.y = -1; cout << contains(p); } }; int n; Point input[15]; string name[15]; int main() { ifstream cin("myacm.txt"); while(cin >> n && n) { int m_v = -1; string ans; for(int i = 0; i < n; ++i) { cin >> name[i] >> input[i].x >> input[i].y; } Triangle t; for(int i = 0; i < n; ++i) { t.a = input[i]; for(int j = i+1; j < n; ++j) { t.b = input[j]; for(int k = j+1; k < n; ++k) { t.c = input[k]; bool ok = true; for(int l = 0; l < n; ++l) { if(l == i || l == j || l == k) continue; if(t.contains(input[l])) ok = false; } if(ok) { int v = t.s(); if(v > m_v) { m_v = v; ans = name[i] + name[j] + name[k]; } } } } } cout << ans << endl; } }