#include <bits/stdc++.h>
using namespace std;
bool vec[8][105];
int n, k;
char c[] = ".#";
void Afisare() {
  int i, j;
  for (i = 1; i <= 4; i++) {
    for (j = 1; j <= n; j++) {
      cout << c[vec[i][j]];
    }
    cout << "\n";
  }
}
int main() {
  int i, cont = 0;
  cin >> n >> k;
  if (k % 2 == 0) {
    for (i = 2; i <= k / 2 + 1; i++) {
      vec[2][i] = 1;
      vec[3][i] = 1;
    }
  } else if (k <= n - 2) {
    for (i = (n - k) / 2 + 1; i < (n - k) / 2 + 1 + k; i++) {
      if (i % 2 == 0)
        vec[2][i] = 1;
      else
        vec[3][i] = 1;
    }
  } else {
    for (i = 2; i <= n - 1; i++) {
      vec[2][i] = 1;
      k--;
    }
    for (i = 2; i <= n - 1 && k > 1; i++) {
      vec[3][i] = 1;
      k--;
      cont++;
    }
    vec[3][n - 1] = 1;
  }
  cout << "YES\n";
  Afisare();
  return 0;
}
