#include <bits/stdc++.h>
using namespace std;
int n, k;
char a[110][110];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) a[i][j] = 'S';
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (k <= 0) break;
      if (a[i - 1][j] != 'L' && a[i + 1][j] != 'L' && a[i][j - 1] != 'L' &&
          a[i][j + 1] != 'L') {
        a[i][j] = 'L';
        k--;
      }
    }
  if (k > 0)
    cout << "NO";
  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;
}
