#include <bits/stdc++.h>
using namespace std;
char arr[550][550];
int main() {
  int n, k;
  cin >> n >> k;
  int cnt = 0;
  int f = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if ((i + j) % 2 == 0 && cnt < k) {
        arr[i][j] = 'L';
        ++cnt;
      } else
        arr[i][j] = 'S';
    }
  }
  if (k <= (n * n + 1) / 2) {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        cout << arr[i][j];
      }
      cout << "\n";
    }
    return 0;
  } else {
    cout << "NO\n";
    return 0;
  }
}
