/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author Kein Yukiyoshi
 */

// clang-format off
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
#define Endl endl
#define itn int
#define fi first
#define se second
#define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; i++)
#define rep2(i, a, b) for (int i = (int)(a), i##_len=(b); i < i##_len; i++)
#define rep3(i, a, b) for (int i = (int)(a), i##_len=(b); i >= i##_len; i--)
#define FOR(i, a) for (auto &i: a)
#define ALL(obj) begin(obj), end(obj)
#define _max(x) *max_element(ALL(x))
#define _min(x) *min_element(ALL(x))
#define _sum(x) accumulate(ALL(x), 0LL)
#define LOWER_BOUND(A, key) distance(begin(A), lower_bound(ALL(A), key))
#define UPPER_BOUND(A, key) distance(begin(A), upper_bound(ALL(A), key))

const int MOD   = 1000000007;
// const int MOD    = 998244353;
const int INF    = (int)(1e13 + 7);
const double EPS = 1e-14;
const double PI  = 3.14159265358979;
template <class T> using V = vector<T>;
template <class T> using VV = vector<vector<T>>;
template <class T> using VVV = vector<vector<vector<T>>>;
template <class T, class S>  using P = pair<T, S>;
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b;return true;}return false;}
template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b;return true;}return false;}
int _ceil(int a, int b) { return (a >= 0 ? (a + (b - 1)) / b : (a - (b - 1)) / b); }
int _mod(int &a) {a = a >= 0 ? a % MOD : a - (MOD * _ceil(a, MOD));return a;}
int _pow(int a, int b) {int res = 1;for (a %= MOD; b; a = a * a % MOD, b >>= 1)if (b & 1) res = res * a % MOD;return res;}
// clang-format on

char zyanken(char a, char b) {
  if (a == b) {
    return a;
  }
  if (a > b) swap(a, b);
  if (a == 'P' and b == 'R') {
    return a;
  } else if (a == 'P' and b == 'S') {
    return b;
  } else {
    return a;
  }
}

class CLargeRPSTournament {
public:
  static void solve(istream &cin, ostream &cout) {
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    int n, k;
    cin >> n >> k;
    string s;
    cin >> s;
    while (1) {
      if (k == 0) {
        cout << s[0] << endl;
        return;
      }
      if (k < 10 and _pow(2, k) <= n) {
        int m = _pow(2, k);
        V<char> list(m);
        rep(i, m) list[i] = s[i];
        while (list.size() > 1) {
          V<char> list2;
          rep(i, list.size() / 2) {
            list2.emplace_back(zyanken(list[2 * i], list[2 * i + 1]));
          }
          list = list2;
        }
        cout << list[0] << endl;
        return;
      }
      if (n % 2 == 0) {
      string list2;
        rep(i, n / 2) {
          list2 += (zyanken(s[(2 * i)%n], s[(2 * i + 1)%n]));
        }
        n = list2.size();
        k--;
        s = list2;
      } else {
        string list2;
        rep(i, n ) {
          list2+=(zyanken(s[(2 * i)%n], s[(2 * i + 1)%n]));
        }
        n = list2.size();
        k--;
        s = list2;
      }
    }
  }
};


signed main() {
  CLargeRPSTournament solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

	#include <bits/stdc++.h>
	#define loop(n) for(ll i=0;i<n;i++)
	#define loopj(n) for(ll j=0;j<n;j++)
	#define loopR(i,a,b,c) for(ll i=a;i>=b;i-=c)
	#define rng(i,a,b,c) for(ll i = a; i<b;i+=c)
	#define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
	#define ll long long   
	#define ld long double
	#define pb push_back
	#define mp make_pair
	#define all(s) s.begin(),s.end()
	ll mod=10e9+7;
	using namespace std; 
	//--------------------------\\
	//code once think twice
	
	void go()
	{
		ll a,b,v;
		
		cin>>a>>b>>v;
		
		ll x=a*a+b*b;
		
		if(x<(v*v))
		cout<<"Yes"<<'\n';
		else
		cout<<"No"<<'\n';
		
    }
	
	int main() 
	{ 

    ll t; 
	 
	fast;
	
//    cin>>t; 
//    
//	loop(t) 
	go();

	}
