#include <bits/stdc++.h>
using namespace std;
const int INF = numeric_limits<int>().max();
int main() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  int am = 0;
  if (n % 2 == 0)
    am = n / 2 * n;
  else
    am = (n / 2 + 1) * (n / 2 + 1) + (n / 2) * (n / 2);
  if (am < k) {
    cout << "NO";
    return 0;
  }
  char f[n][n];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) f[i][j] = 'S';
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (k) {
        if (i % 2 == j % 2) {
          f[i][j] = 'L';
          --k;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) cout << f[i][j];
    cout << endl;
  }
  return 0;
}
