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