#include #include #include #include #include #include #include #include #include #include #include #include #define int long long using namespace std; #define all(x) (x).begin(),(x).end() #define rep(i,n) for (int i=0;i<(n);++i) #define prep(i,n) for (int i=1;i<=(n);++i) int INF = 900000000000000; int mod=998244353; signed main(){ int n,w;cin>>n>>w;int ans=-1; rep(i,n){ int u,v;cin>>u>>v; if(v<=w){ans=max(ans,u);} } cout<