#include <bits/stdc++.h>
using namespace std;
bool sorts(pair<int, double> a, pair<int, double> b) {
  if (a.second == b.second)
    return a.first > b.first;
  else
    return a.second < b.second;
}
double dist(double a, double b, double c, double d) {
  double dist = sqrt(fabs(a - c) * fabs(a - c) + fabs(b - d) * fabs(b - d));
  return dist;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int n, k;
  cin >> n >> k;
  if (k > ceil((double)n * n / 2.0))
    cout << "NO";
  else {
    cout << "YES" << endl;
    if (n % 2) {
      bool land = true;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          if (land && k != 0) {
            cout << "L";
            land = false;
            k--;
          } else {
            cout << "S";
            land = true;
          }
        }
        cout << "\n";
      }
    } else {
      bool land = true;
      for (int i = 0; i < n; i++) {
        if (i % 2 == 0)
          land = true;
        else
          land = false;
        for (int j = 0; j < n; j++) {
          if (land && k != 0) {
            cout << "L";
            land = false;
            k--;
          } else {
            cout << "S";
            land = true;
          }
        }
        cout << "\n";
      }
    }
  }
}
