#include<stdio.h>
int main()
{
int n,i,mini,maxi,x1,x2,x3,y1,y2,y3,a,min,max;
scanf("%d",&n);
min=9000000;
max=-9000000;
mini=0;
maxi=0;
for(i=1;i<=n;i++)
{
scanf("%d %d %d %d %d %d",&x1,&y1,&x2,&y2,&x3,&y3);
a=(x1*y2-x2*y1)+(x2*y3-x3*y2)+(x3*y1-x3*y1);
if(a<0)
a=-1*a;
if(min>=a)
{
min=a;
mini=i;
}
if(max<=a)
{
max=a;
maxi=i;
}
}
printf("%d %d\n",mini,maxi);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KaW50IG1haW4oKQp7CglpbnQgbixpLG1pbmksbWF4aSx4MSx4Mix4Myx5MSx5Mix5MyxhLG1pbixtYXg7CglzY2FuZigiJWQiLCZuKTsKCW1pbj05MDAwMDAwOwoJbWF4PS05MDAwMDAwOwoJbWluaT0wOwoJbWF4aT0wOwoJZm9yKGk9MTtpPD1uO2krKykKCXsKCQlzY2FuZigiJWQgJWQgJWQgJWQgJWQgJWQiLCZ4MSwmeTEsJngyLCZ5MiwmeDMsJnkzKTsKCQlhPSh4MSp5Mi14Mip5MSkrKHgyKnkzLXgzKnkyKSsoeDMqeTEteDMqeTEpOwoJCWlmKGE8MCkKCQlhPS0xKmE7CgkJaWYobWluPj1hKQoJCXsKCQkJbWluPWE7CgkJCW1pbmk9aTsKCQl9CgkJaWYobWF4PD1hKQoJCXsKCQkJbWF4PWE7CgkJCW1heGk9aTsKCQl9Cgl9CglwcmludGYoIiVkICVkXG4iLG1pbmksbWF4aSk7CglyZXR1cm4gMDsKfSA=