#include <bits/stdc++.h>
using namespace std;
char ans[500][500];
int main() {
  int n, k;
  while (cin >> n >> k) {
    if (k > 1 && (n & 1) && (k > ((n * n) / 2) + 1))
      cout << "NO\n";
    else if (k > 1 && !(n & 1) && (k > (n * n) / 2))
      cout << "NO\n";
    else {
      cout << "YES\n";
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) ans[i][j] = 'S';
      }
      int K = k, done = 0, s, e;
      for (int i = 0; i < n; i++) {
        if (i & 1)
          s = 1;
        else
          s = 0;
        for (int j = s; j < n; j += 2) {
          if (K == 0) {
            done = 1;
            break;
          }
          ans[i][j] = 'L';
          K--;
        }
        if (done) break;
      }
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) cout << ans[i][j];
        cout << endl;
      }
    }
  }
  return 0;
}
