#include <bits/stdc++.h>
using namespace std;
char grid[4][105];
int main() {
  int n, k;
  cin >> n >> k;
  cout << "Yes" << endl;
  for (int i = 1; i < 3; i++) {
    for (int j = 1; j < n / 2; j++) {
      if (k <= 1)
        break;
      else {
        grid[i][j] = grid[i][n - j - 1] = '#';
        k -= 2;
      }
    }
    if (k <= 1) break;
  }
  if (k >= 1) {
    for (int i = 1; i < 3; i++) {
      grid[i][n / 2] = '#';
      k--;
      if (k == 0) break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < n; j++) {
      if (grid[i][j] != '#')
        cout << '.';
      else
        cout << grid[i][j];
    }
    cout << endl;
  }
}
