#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  if (k > (n * n + 1) / 2)
    cout << "NO\n";
  else {
    cout << "YES\n";
    int islands = 0;
    vector<vector<string>> ans;
    for (int i = 0; i < n; ++i) {
      string str;
      for (int j = 0; j < n; ++j) {
        if (i % 2 == 0) {
          if (j % 2 == 0 && islands < k) {
            islands++;
            str.push_back('L');
          } else
            str.push_back('S');
        } else {
          if (j % 2 != 0 && islands < k) {
            islands++;
            str.push_back('L');
          } else
            str.push_back('S');
        }
      }
      cout << str << endl;
    }
  }
  return 0;
}
