#include using namespace std; // Short forms #define ll long long #define ull unsigned long long #define nl '\n' #define ff first #define ss second #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() #define pb push_back #define mp make_pair // Loops #define nlp(i, n) for (int i = 0; i < (int)(n); ++i) #define lp(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i) #define rlp(i, a, b) for (int i = (int)(a); i >= (int)(b); --i) #define llp(i,a,b) for (ll i= (ll)(a); i <= (ll)(ll)(b); ++i) // STLs #define pii pair #define vi vector #define vll vector #define vvi vector> #define vvl vector> // Outputs #define yes cout<<"YES"<m; int n; cin>>n; nlp(i,n) { int x,y; cin>>x>>y; if(y%2==0) y--; m.insert(mp(x+y/2,x)); } auto it=m.begin(); cout<first<> TC; while (TC--) solve(); }