#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, s;
  char x[100][100];
  cin >> n >> k;
  s = k;
  bool l = true, lors = true;
  if ((n % 2 == 0 && k <= int(n * n / 2))) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (s == 0) l = false;
        if (l) {
          if (lors) {
            x[i][j] = 'L';
            s = s - 1;
            lors = false;
            ;
          } else {
            x[i][j] = 'S';
            lors = true;
          }
        } else
          x[i][j] = 'S';
      }
      lors = !lors;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        cout << x[i][j];
      }
      cout << endl;
    }
  }
  if ((n % 2 == 1 && k <= (int(n * n / 2) + 1))) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        if (s == 0) l = false;
        if (l) {
          if (lors) {
            x[i][j] = 'L';
            s = s - 1;
            lors = false;
            ;
          } else {
            x[i][j] = 'S';
            lors = true;
          }
        } else
          x[i][j] = 'S';
      }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        cout << x[i][j];
      }
      cout << endl;
    }
  } else if (!((n % 2 == 1 && k <= (int(n * n / 2) + 1)) ||
               (n % 2 == 0 && k <= int(n * n / 2))))
    cout << "NO";
}
