#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  string s = "";
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (i & 1) {
        if (j & 1 && m)
          --m, s += "L";
        else
          s += "S";
      } else {
        if (!(j & 1) && m)
          --m, s += "L";
        else
          s += "S";
      }
    }
    s += "x";
  }
  if (m) return cout << "NO", 0;
  cout << "YES\n";
  for (char c : s) {
    if (c == 'x') {
      cout << '\n';
      continue;
    }
    cout << c;
  }
}
