#include <bits/stdc++.h>
using namespace std;
const int N = 10e5;
int arr[N];
int main() {
  int n, k;
  cin >> n >> k;
  if (k > ceil((double)(n * n) / 2))
    cout << "NO" << endl;
  else {
    int x = 0;
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (k) {
          if (i % 2 == 0) {
            if (j % 2 == 0)
              cout << "L", k--;
            else
              cout << "S";
          }
          if (i % 2 == 1) {
            if (j % 2 == 0)
              cout << "S";
            else
              cout << "L", k--;
          }
        } else
          cout << "S";
        x++;
      }
      cout << endl;
    }
  }
  return 0;
}
