#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
int main() {
  int n, m, cnt, i, j;
  while (~scanf("%d%d", &n, &m)) {
    if ((n % 2 == 0 && m * 2 <= n * n) || (n % 2 && m * 2 <= n * n + 1)) {
      printf("YES\n");
      cnt = 0;
      for (i = 1; i <= n; i++) {
        for (j = 1; j <= n; j++) {
          if (i % 2 == j % 2 && cnt < m) {
            printf("L");
            cnt++;
          } else
            printf("S");
        }
        printf("\n");
      }
    } else
      printf("NO\n");
  }
  return 0;
}
