#include #include #include #include #include #include #include using namespace std; int main() { int N; cin >> N; int a, b; vector v; int maxV = 0; for(int i=0; i> a >> b; v.push_back(a + b * 4); maxV = max(maxV, v[i]); } int ans = 0; bool f = true; if(maxV < 2){ f = false; }else{ for(int i=0; i