#include <bits/stdc++.h>
int n, k;
int a[111][111];
int x[] = {0, 0, 1, -1};
int y[] = {1, -1, 0, 0};
bool check(int i, int j) { return i >= 0 && i < n && j >= 0 && j < n; }
bool is(int i, int j, int vi, int vj) {
  for (int t = 0; t < 4; t++) {
    int nxI = i + x[t];
    int nxJ = j + y[t];
    if (check(nxI, nxJ)) {
      if (nxI == vi && nxJ == vj) continue;
      if (a[nxI][nxJ] == 0) return false;
    }
  }
  return true;
}
void dfs(int vi, int vj) {
  for (int i = 0; i < 4; i++) {
    int nxI = vi + x[i];
    int nxJ = vj + y[i];
    if (check(nxI, nxJ) && a[nxI][nxJ] == 1) {
      if (is(nxI, nxJ, vi, vj)) {
        a[nxI][nxJ] = 0;
        dfs(nxI, nxJ);
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  int ans = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (((i + j) & 1)) {
        a[i][j] = 1;
        ans++;
      }
  ans = n * n - ans;
  if (ans < k) return puts("NO"), 0;
  puts("YES");
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (a[i][j] == 0 && ans != k) {
        a[i][j] = 1;
        ans--;
      }
  for (int i = 0; i < n; i++, puts(""))
    for (int j = 0; j < n; j++) printf("%c", a[i][j] ? 'S' : 'L');
}
