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