[Cpp]
/* Brute-force enumeration.
Determine whether the vertex is in the triangle and calculate the area using the cross product.
*/
# Include <stdio. h>
# Include <cmath>
# Define eps 1e-8
Struct point
{
Double x, y;
Char op;
} P [16];
Double xmul (point a, point B, point c)
{
Return fabs (B. x-a.x) * (c. y-a.y)-(B. y-a.y) * (c. x-a.x ));
}
Bool is_in (point o, point a, point B, point c)
{
Double sum = xmul (o, a, B) + xmul (o, B, c) + xmul (o, c, );
If (sum = xmul (a, B, c) return true;
Return false;
}
Int main ()
{
Int n, a, B, c;
While (scanf ("% d", & n) = 1 & n)
{
Double ans = 0;
For (int I = 1; I <= n; I ++)
Scanf ("% c % lf", & p [I]. op, & p [I]. x, & p [I]. y );
For (int k = 3; k <= n; k ++)
For (int I = 2; I <k; I ++)
For (int j = 1; j <I; j ++)
{
Bool ret = false;
For (int q = 1; q <= n; q ++)
{
If (q = I | q = j | q = k) continue;
If (is_in (p [q], p [I], p [j], p [k])
{
Ret = true;
Break;
}
}
If (! Ret)
{
If (xmul (p [I], p [j], p [k])> ans) ans = xmul (p [I], p [j], p [k]), a = j, B = I, c = k;
}
}
Printf ("% c \ n", p [a]. op, p [B]. op, p [c]. op );
}
Return 0;
}