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