12709

#include <iostream>
#include <stdio.h>

using namespace std;

int MX;
int main()
{
int n;

int L,W,H,V;

while(cin>>n)
{
if(n==0)
break;

MX=-1;
for(int i=0;i<n;i++)
{
cin>>L>>W>>H;

if(H>MX)
{
MX=H;
V=L*W*H;
}
else if(H==MX)
{
if(L*W*H>V)
V=L*W*H;
}
}

cout<<V<<"\n";
}

return 0;
}

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *