#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const int N = 3e5 + 10;
const int M = 3e6 + 10;
const long long mod = 998244353;
const double PI = acos(-1);
inline long long ab(long long x) { return x < 0 ? -x : x; }
inline int mm(int x, int p) { return x >= p ? x - p : x < 0 ? x + p : x; }
bool ans[4][121];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  puts("YES");
  memset(ans, false, sizeof ans);
  for (int i = 1; i <= 2 && k >= 2; ++i) {
    for (int j = 1; j < (n >> 1) && k >= 2; ++j) {
      k -= 2;
      ans[i][j] = ans[i][n - 1 - j] = true;
    }
  }
  for (int i = 1; i <= 2; ++i)
    if (k) k--, ans[i][n >> 1] = true;
  for (int i = 0; i <= 3; ++i) {
    for (int j = 0; j < n; ++j)
      if (ans[i][j])
        putchar('#');
      else
        putchar('.');
    puts("");
  }
  return 0;
}
