暴力搜索
#include<cstdio> struct node
{
int x;
int y;
}s[];
int main()
{
//freopen("input.txt","r",stdin);
int a,b,n,num;
int i;
bool flag;
while(scanf("%d",&n) && n)
{
for(i = ; i < * n; i++)
scanf("%d%d",&s[i].x,&s[i].y);
flag = ;
for(a = - ; a <= ; a++)
{
for(b = -; b <= ; b++)
{
num = ;
if(a == && b == ) continue;
for(i = ; i < * n; i++)
{
if(a * s[i].x + b * s[i].y > ) num++;
if(a * s[i].x + b * s[i].y == ) break;
}
if(i == * n && num == n)
{
flag = ;
break;
}
}
if(flag) break;
}
printf("%d %d\n",a,b);
} return ;
}