#include <bits/stdc++.h>
using namespace std;
const int mill = 1e9;
const long long mln = 1e6;
const int INF = 2e9;
const long long mod = 1e9 + 7;
const long long mod2 = 3e9 - 71;
const long long longINF = 3e18;
const long double pi = acos(-1);
const long double eps = 1e-8;
const int M = 1 << 21;
const long long smod = 998244353;
int n, k;
char c[4][99];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  cin >> n >> k;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < n; j++) c[i][j] = '.';
  }
  if (!(k & 1)) {
    for (int i = 0; i < k / 2; i++) c[1][i + 1] = c[2][i + 1] = '#';
  } else if (k > n - 2) {
    for (int i = 1; i <= n - 2; i++) c[1][i] = '#';
    c[2][1] = c[2][n - 2] = '#';
    for (int i = 2; i < 2 + k - n; i++) c[2][i] = '#';
  } else
    for (int i = n / 2 - k / 2; i <= n / 2 + k / 2; i++) c[1][i] = '#';
  cout << "YES\n";
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < n; j++) cout << c[i][j];
    cout << '\n';
  }
  return 0;
}
