#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
char data[1050][1050];
int main() {
  int n, k;
  cin >> n >> k;
  int valuex = 0;
  if (n % 2 == 0) {
    valuex = (n / 2) * (n / 2) + (n / 2) * (n / 2);
  } else {
    valuex = (n / 2 + 1) * (n / 2 + 1) + ((n / 2) * (n / 2));
  }
  if (k > valuex) {
    cout << "NO" << endl;
    return 0;
  } else {
    cout << "YES" << endl;
    int xc = 0;
    for (int i = 0; i < n; i++) {
      if (xc == k) break;
      if (i % 2 == 0) {
        for (int j = 0; j < n; j += 2) {
          data[i][j] = 'L';
          xc++;
          if (xc == k) break;
        }
      } else {
        for (int j = 1; j < n; j += 2) {
          data[i][j] = 'L';
          xc++;
          if (xc == k) break;
        }
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (data[i][j] != 'L')
          cout << "S";
        else
          cout << "L";
      }
      cout << endl;
    }
  }
  return 0;
}
