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