#include <bits/stdc++.h>
using namespace std;
using namespace std;
int n, k;
int a[100][100];
void handle() {}
int main() {
  cin >> n >> k;
  handle();
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) a[i][j] = 0;
  int p = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (p == k) break;
      if (!a[i][j]) {
        a[i][j] = 1;
        p++;
        if (j < (n - 1)) a[i][j + 1] = -1;
        if (i < (n - 1)) a[i + 1][j] = -1;
      }
    }
  if (p < k) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == 1)
        cout << 'L';
      else
        cout << 'S';
    }
    cout << endl;
  }
  cin >> n;
  return 0;
}
