#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
void solve() {
  int n, k;
  cin >> n >> k;
  int max = pow((n + 1) / 2, 2) + pow(n / 2, 2);
  if (k > max) {
    cout << "NO";
    return;
  }
  cout << "YES\n";
  int flag = 1;
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (n); ++j) {
      if (k) {
        if (j == 0 && i % 2 == 0) {
          flag = 1;
        } else if (j == 0 && i % 2)
          flag = 0;
        if (flag)
          cout << "L", k--;
        else
          cout << "S";
      } else
        cout << "S";
      flag = 1 - flag;
    }
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
