#include using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) typedef long long ll; int main(){ int n; cin>>n; int a,b; int mx=0; vector v; rep(i,n){ cin>>a>>b; mx=max(mx,(a+b*4)); v.push_back(a+b*4); } ll ans=0; rep(i,n){ if(v[i]%2==1){cout<<"-1"<