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