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