#include #include using namespace std; int main(void){ int N; cin >> N; long int max=0, ans=0; vector v(N); for(int i=0; i> a>> b; v[i] = a + b*4; if(max< v[i]) max = v[i]; } for(int i=0; i