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