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