#include<bits/stdc++.h>usingnamespace std;structant{int loc;int v;};boolcmp(ant a, ant b){return a.loc < b.loc;}int n;
ant a[100];intmain(){while(cin>>n){
ant op;for(int i =0; i < n; i ++){
cin>>a[i].loc>>a[i].v;if(a[i].v ==0) op = a[i];}sort(a, a + n, cmp);
vector<int>l, r;for(int i =0; i < n; i ++){if(a[i].loc < op.loc && a[i].v ==1) l.push_back(a[i].loc);elseif(a[i].loc > op.loc && a[i].v ==-1) r.push_back(a[i].loc);}if(l.size()== r.size()) cout<<"Cannot fall!"<<endl;elseif(l.size()> r.size()) cout<<100- l[l.size()- r.size()-1]<<endl;else cout<<r[l.size()]<<endl;}return0;}