#include <bits/stdc++.h>
using namespace std;
const long long INF = 2147483647;
const int MX = 200;
bool mp[MX][MX];
int main() {
  int n, m;
  cin >> n >> m;
  int si = 0;
  for (long long i = 0; i < n; i++) {
    if (si >= m) break;
    for (long long j = i % 2; j < n; j++) {
      mp[i][j] = true;
      j++;
      si++;
      if (si >= m) break;
    }
  }
  if (si < m)
    cout << "NO";
  else {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        cout << (mp[i][j] ? 'L' : 'S');
      }
      cout << '\n';
    }
  }
}
