#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  int ss = ((int)(v).size());
  for (int(i) = 0; (i) < (ss); ++(i)) out << v[i] << " ";
  return out;
}
template <typename T, typename TT>
ostream& operator<<(ostream& out, const pair<T, TT>& p) {
  out << p.first << " " << p.second;
  return out;
}
template <typename T, typename TT>
istream& operator>>(istream& in, pair<T, TT>& s) {
  in >> s.first >> s.second;
  return in;
}
template <typename T>
bitset<sizeof(T) * 8> BIN(T a) {
  return bitset<sizeof(T) * 8>(a);
}
long long dp[2][505][505];
int arr[505];
long long mod;
void add(long long& a, long long& b) {
  a += b;
  while (a >= mod) a -= mod;
}
int main() {
  int n, k;
  cin >> n >> k;
  int f = 0;
  if (k > (n * n + 1) / 2)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int(i) = 0; (i) < (n); ++(i)) {
      for (int(j) = 0; (j) < (n); ++(j)) {
        if (k && (f == (j & 1))) {
          cout << "L";
          k--;
        } else
          cout << "S";
      }
      cout << endl;
      f = 1 - f;
    }
  }
  return 0;
}
