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