#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
using namespace std;


int main(){
    char s,t;
  	cin>>s>>t;
  if(s=='Y')t= toupper(t);
  cout<<t<<endl;
  
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ALL(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;

  int main(){
  int n , s , d;
    cin >> n >> s >> d;
    rep(i,n){
    int x , y;
      cin >> x >> y;
      if(x >= s || y <= d){
      continue;
      }
      else{
      cout << "Yes";
        return 0;
      }
    }
    cout << "No";
  }
