#include <bits/stdc++.h>
using namespace std;
int A[105][105];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    if (m == 0) break;
    for (int j = 0; j < n; j++) {
      if (i % 2 == 0 && j % 2 == 0) {
        A[i][j] = 1;
        m--;
      } else if (i % 2 && j % 2) {
        A[i][j] = 1;
        m--;
      }
      if (m == 0) break;
    }
    if (m == 0) break;
  }
  if (m > 0) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if (A[i][j] == 1)
        cout << "L";
      else
        cout << "S";
    cout << "\n";
  }
  return 0;
}
