#include <bits/stdc++.h>
using namespace std;
static long long n, k;
void solve() {
  vector<string> res(n, "");
  for (int i = 0; i < n; i++) {
    int j = 0;
    while (j < n) {
      if (((i + j) & 1) == 0 && k) {
        res[i] += 'L';
        k--;
      } else {
        res[i] += 'S';
      }
      j++;
    }
  }
  if (k) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (auto i : res) {
      for (auto j : i) cout << j;
      cout << "\n";
    }
  }
}
int main() {
  cin >> n >> k;
  solve();
  return 0;
}
