#include <bits/stdc++.h>
using namespace std;
int n, k;
bool ban[505][505];
int main() {
  scanf("%d%d", &n, &k);
  if (((n * n + 1) >> 1) < k) return puts("NO"), 0;
  puts("YES");
  int cnt1 = 0, cnt2 = 1;
  for (int i = 1; i <= n && cnt1 < k; i++) {
    if (n % 2 == 0) cnt2--;
    for (int r = 1; r <= n && cnt1 < k; r++, cnt2++)
      if (cnt2 & 1) ban[i][r] = true, cnt1++;
  }
  for (int i = 1; i <= n; i++) {
    for (int r = 1; r <= n; r++)
      if (ban[i][r])
        putchar('L');
      else
        putchar('S');
    putchar('\n');
  }
}
