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