#include const int N = 1010; int a[N], b[N]; using namespace std; int w[N]; int main() { int n; cin >> n; int wm =0; for(int i = 0; i < n; ++i) {cin >> a[i] >>b[i]; w[i] = a[i]+4*b[i];wm=max(wm,w[i]);} int cnt =0; for(int i = 0;i