#include <bits/stdc++.h>
using namespace std;
const int Maxn = 200;
int n, k;
bool grd[Maxn][Maxn];
void solve() {
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if (k && !((i + j) % 2))
        k--, cout << "L";
      else
        cout << "S";
    cout << endl;
  }
}
int main() {
  cin >> n >> k;
  int ted = ((n * n) + 1) / 2;
  if (k > ted)
    cout << "NO" << endl;
  else
    solve();
  return 0;
}
