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