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