#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000 + 10;
int main() {
  int n, k, s;
  scanf("%d %d", &n, &k);
  if (n % 2 == 0)
    s = n * n / 2;
  else
    s = n * (n - 1) / 2 + (n + 1) / 2;
  if (s < k)
    printf("NO\n");
  else {
    printf("YES\n");
    int cnt = 0;
    char left;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0)
        left = 'S';
      else
        left = 'L';
      for (int j = 0; j < n; j++) {
        if (left == 'S' && cnt < k) {
          printf("L");
          cnt++;
          left = 'L';
        } else {
          printf("S");
          left = 'S';
        }
      }
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}
