#include <bits/stdc++.h>
bool ans[7][107];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  puts("YES");
  if (k & 1) {
    k--;
    int mid = n + 1 >> 1;
    ans[2][mid] = true;
    int p = 2, q = n - 1;
    while (k && p < mid) ans[2][p] = ans[2][q] = true, k -= 2, p++, q--;
    p = 2, q = n - 1;
    while (k && p < mid) ans[3][p] = ans[3][q] = true, k -= 2, p++, q--;
  } else {
    int len = k >> 1;
    for (int i = 2; i < len + 2; i++) {
      ans[2][i] = ans[3][i] = true;
    }
  }
  for (int i = 1; i <= 4; i++) {
    for (int j = 1; j <= n; j++) {
      printf("%c%s", ans[i][j] ? '#' : '.', j == n ? "\n" : "");
    }
  }
  return 0;
}
