#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int MAX = 105;
char a[MAX][MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i % 2 == j % 2 && k) {
        k--;
        a[i][j] = 'L';
      } else {
        a[i][j] = 'S';
      }
    }
  }
  if (k)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        cout << a[i][j];
      }
      cout << "\n";
    }
  }
}
