#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int k;
  cin >> n >> k;
  char m[101][101];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (k != 0) {
        if ((i + j) % 2 == 0) {
          k--;
          m[i][j] = 'L';
        } else {
          m[i][j] = 'S';
        }
      } else {
        m[i][j] = 'S';
      }
    }
  }
  if (k == 0) {
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
        cout << m[i][j];
      }
      cout << endl;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
