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