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