#include <bits/stdc++.h>
using namespace std;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b)) * b;
}
long long int mod_pow(long long int x, long long int y, long long int m) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0) {
    long long int power = mod_pow(x, y / 2, m);
    return (power * power) % m;
  } else {
    long long int power = mod_pow(x, y / 2, m);
    return (((power * power) % m) * x) % m;
  }
}
void solve() {
  long long int n, k, first, second;
  cin >> n >> k;
  first = n % 2 == 0 ? n / 2 : (n / 2) + 1;
  second = n / 2;
  if (n % 2 == 0 && (n / 2) * (first + second) < k)
    cout << "NO";
  else if ((n / 2) * (first + second) + first < k)
    cout << "NO";
  else {
    cout << "YES\n";
    vector<string> str_arr(n);
    long long int l = 0;
    for (long long int i = 0; i < n; i++)
      for (long long int j = 0; j < n; j++)
        if (l < k) {
          if (i % 2 == 0) {
            if (j % 2 == 0) {
              str_arr[i].push_back('L');
              l++;
            } else
              str_arr[i].push_back('S');
          } else {
            if (j % 2 == 0)
              str_arr[i].push_back('S');
            else {
              str_arr[i].push_back('L');
              l++;
            }
          }
        } else
          str_arr[i].push_back('S');
    for (long long int i = 0; i < n; i++) cout << str_arr[i] + "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
