#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  char arr[n][n];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) arr[i][j] = 'S';
  int i = 0;
  int flag = 1;
  while (i < n && k > 0) {
    flag = 1 - flag;
    for (int j = flag; j < n && k > 0; j = j + 2) {
      arr[i][j] = 'L';
      k--;
    }
    i++;
  }
  if (k > 0)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) cout << arr[i][j];
      cout << endl;
    }
  }
  return 0;
}
