#include <bits/stdc++.h>

using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);


int32_t main(){
    IOS 

    string s,t;
    cin>>s>>t;
    if(s[0]=='Y'){
        t[0] = t[0]-'a'+'A';
    }
    cout<<t[0]<<endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep2(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;
ll MOD=1000000007;
int main(){
 ll a,b;
  cin>>a>>b;
  ll d=b-a;
  ll ans=1;
  rep2(i,1,d+1){
    if(a%i==0&&i*(a/i+1)<=b&&i>ans) ans=i;
 else if(a%i!=0&&a<=i*(a/i+1)&&i*(a/i+2)<=b&&i>ans) ans=i;
  }
  cout<<ans;
return 0;
}