#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  while (cin >> n >> k) {
    float max = n / 2.0;
    int maxx;
    maxx = n / 2;
    maxx *= n / 2;
    max = ceil(max);
    max *= ceil(n / 2.0);
    max += maxx;
    if (k > max) {
      cout << "NO" << endl;
    } else {
      int count = 0;
      bool r = 0;
      cout << "YES" << endl;
      int L = 0;
      for (int i = 0; i < n; i++) {
        for (int m = 0; m < n; m++) {
          if (i % 2 == 0 && k > count) {
            if (m % 2 == 0) {
              count++;
              r = 0;
              cout << 'L';
            } else {
              cout << 'S';
              r = 1;
              continue;
            }
          } else if (k > count) {
            if (m % 2 == 1) {
              count++;
              r = 0;
              cout << 'L';
            } else {
              cout << 'S';
              r = 1;
              continue;
            }
          } else
            cout << 'S';
        }
        cout << endl;
      }
    }
  }
}
