/*
Time:2019.11.15
Author: Goven
type:水题
err:
ref:
*/
#include<iostream>
using namespace std;
int main()
{
int n, k, a, b, t, max;
while (cin >> n && n) {
k = max = 0;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
t = a + b - 8;
if (t > 0 && t > max) {
max = t;
k = i;
}
}
cout << k << endl;
}
return 0;
}
网友评论