#include <bits/stdc++.h>
using namespace std;
const long long oo = 1e9 + 7;
long long k, n, nums;
char a[200][200];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  if (n * n % 2)
    nums = n * n / 2 + 1;
  else
    nums = n * n / 2;
  if (k > nums) {
    cout << "NO";
    return 0;
  } else
    cout << "YES\n";
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) a[i][j] = 'S';
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j)
      if (k > 0) {
        if (a[i - 1][j] != 'L' && a[i][j - 1] != 'L' && a[i][j + 1] != 'L')
          a[i][j] = 'L', --k;
      }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) cout << a[i][j];
    cout << "\n";
  }
  return 0;
}
