#include <bits/stdc++.h>
using namespace std;
int n, k, a[102][102];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++)
    if (i & 1)
      a[0][i] = 'S';
    else
      a[0][i] = 'L';
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (a[i - 1][j] != 'L' && k)
        a[i][j] = 'L', k--;
      else
        a[i][j] = 'S';
    }
  }
  if (k)
    printf("NO");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        printf("%c", a[i][j]);
      }
      cout << endl;
    }
  }
  return 0;
}
