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