#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
const int N = 1e5 + 7;
const int xinc[] = {0, 0, 1, -1};
const int yinc[] = {1, -1, 0, 0};
void solve() {
  long long n, k, i, j, ans = 0;
  cin >> n >> k;
  if (n & 1) {
    ans = ((n / 2 + 1) * (n / 2 + 1)) + (n / 2) * (n / 2);
  } else {
    ans = (n / 2) * n;
  }
  if (k > ans) {
    cout << "NO";
    return;
  }
  long long count = 0;
  i = 1;
  cout << "YES" << endl;
  while (i <= n) {
    for (j = 1; j <= n; j++) {
      if (count >= k) {
        cout << "S";
        continue;
      }
      if (i & 1) {
        if (j & 1) {
          count++;
          cout << "L";
        } else
          cout << "S";
      } else {
        if (j & 1) {
          cout << "S";
        } else {
          cout << "L";
          count++;
        }
      }
    }
    cout << endl;
    i++;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) solve();
  return 0;
}
