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