#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if ((n * n + 1) / 2 < k) {
    puts("NO");
  } else {
    int cnt = 0, count2 = 0;
    puts("YES");
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        count2++;
        if (cnt < k) {
          if (count2 % 2) {
            putchar('L');
            cnt++;
          } else {
            putchar('S');
          }
        } else {
          putchar('S');
        }
      }
      if (!(n % 2)) {
        count2++;
      }
      putchar('\n');
    }
  }
  return 0;
}
