#include <bits/stdc++.h>
using namespace std;
int maxs[105];
void gs(int n) {
  int res = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if ((i & 1) && (j & 1) || ((!(i & 1)) && (!(j & 1)))) res += 1;
    }
  }
  maxs[n] = res;
}
int main() {
  for (int i = 1; i <= 100; ++i) gs(i);
  int n, k;
  scanf("%d%d", &n, &k);
  if (k > maxs[n]) {
    cout << "NO" << endl;
    return 0;
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (k) {
        if ((i & 1) && (j & 1) || ((!(i & 1)) && (!(j & 1))))
          putchar('L'), k -= 1;
        else
          putchar('S');
      } else
        putchar('S');
    }
    puts("");
  }
}
