#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,W; cin>>N>>W; int ans=-1; for(int i=0;i>v>>w; if(w<=W){ ans=max(ans,v); } } cout<