#include <bits/stdc++.h>
using namespace std;
inline double Time() { return ((clock() * 1.0) / CLOCKS_PER_SEC); }
const int N = 100500;
char a[200][200];
int n, k, sum;
int main() {
  srand(time(NULL));
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      for (int j = 1; j <= n; j += 2) {
        if (k > sum) {
          sum++;
          a[i][j] = 'L';
        }
      }
    } else {
      for (int j = 2; j <= n; j += 2) {
        if (sum < k) {
          sum++;
          a[i][j] = 'L';
        }
      }
    }
  }
  if (k > sum) {
    cout << "NO";
  } else {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (a[i][j] != 'L') {
          cout << 'S';
        } else {
          cout << 'L';
        }
      }
      cout << endl;
    }
  }
  return 0;
}
