#include <bits/stdc++.h>
struct point {
  long long x;
  long long y;
  point(long long a, long long b) {
    x = a;
    y = b;
  }
};
using namespace std;
double sqr(double a) { return a * a; }
int main() {
  long long n, m, max, min, k, l, r, p, q, ans = 0, x, y;
  cin >> n >> k;
  vector<vector<bool> > a(n + 1, vector<bool>(n + 1));
  string s;
  for (int i = 0; i < n; i += 2) {
    x = i;
    y = 0;
    while ((x < n) && (y < n)) {
      a[x][y] = true;
      ans++;
      x++;
      y++;
    }
    x = 0;
    y = i;
    while ((x < n) && (y < n)) {
      a[x][y] = true;
      ans++;
      x++;
      y++;
    }
  }
  ans -= n;
  if (k > ans) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if ((a[i][j]) && (k > 0)) {
        k--;
        cout << 'L';
      } else {
        cout << 'S';
      }
    cout << '\n';
  }
  return 0;
}
