#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int mod = 1e9 + 7;
bool comparator(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first == b.first)
    return a.second < b.second;
  else
    return a.first < b.first;
}
long long exp(long long a, long long b) {
  long long ans = 1;
  while (b != 0) {
    if (b % 2) ans = ans * a;
    a = a * a;
    b /= 2;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  long long maxi = 0;
  if (n % 2) {
    long long m = n * n;
    maxi = (m + 1) / 2;
  } else
    maxi = (n * n) / 2;
  if (k > maxi)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    long long c = 0;
    for (long long i = (long long)0; i < (long long)n; i++) {
      for (long long j = (long long)0; j < (long long)n; j++) {
        if (i % 2 && j % 2 && c < k) {
          c++;
          cout << "L";
        } else if (i % 2 == 0 && j % 2 == 0 && c < k) {
          cout << "L";
          c++;
        } else
          cout << "S";
      }
      cout << endl;
    }
  }
  return 0;
}
