#include <bits/stdc++.h>
const long long oo = 0x3f3f3f3f;
const int _cnt = 1000 * 1000;
const int _p = 1000 * 1000 * 1000 + 7;
long long o(long long x) { return x % _p; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
using namespace std;
void file_put() {
  freopen("filename.in", "r", stdin);
  freopen("filename.out", "w", stdout);
}
string st[205];
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= n + 1; j++) st[i] += 'S';
  if (k > (n * n + 1) / 2)
    return 0 * printf("NO\n");
  else
    printf("YES\n");
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (k && !(i + j & 1)) {
        st[i][j] = 'L';
        k--;
      }
    }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) printf("%c", st[i][j]);
    printf("\n");
  }
  return 0;
}
