#include <bits/stdc++.h>
using namespace std;
const int max_n = 111, inf = 1111111111;
int n, k, cnt;
char a[max_n][max_n];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (cnt == k) {
        a[i][j] = 'S';
        continue;
      }
      if ((i % 2) ^ (j % 2) == 0) {
        a[i][j] = 'L';
        ++cnt;
      } else {
        a[i][j] = 'S';
      }
    }
  }
  if (cnt < k) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cout << a[i][j];
    }
    cout << endl;
  }
  return 0;
}
