#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n, h;
  cin >> n;
  cin >> h;
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i) {
    cout << ".";
  }
  cout << endl;
  vector<char> x;
  x.push_back('.');
  for (size_t i = 1; i < n / 2; ++i) {
    if (h >= 2) {
      x.push_back('#');
      h -= 2;
    } else {
      x.push_back('.');
    }
  }
  for (auto y = x.begin(); y != x.end(); ++y) {
    cout << *y;
  }
  if (h > 0) {
    cout << "#";
    h--;
  } else {
    cout << ".";
  }
  for (auto y = x.rbegin(); y != x.rend(); ++y) {
    cout << *y;
  }
  cout << endl;
  vector<char> z;
  z.push_back('.');
  for (size_t i = 1; i < n / 2; ++i) {
    if (h >= 2) {
      z.push_back('#');
      h -= 2;
    } else {
      z.push_back('.');
    }
  }
  for (auto y = z.begin(); y != z.end(); ++y) {
    cout << *y;
  }
  if (h > 0) {
    cout << "#";
    h--;
  } else {
    cout << ".";
  }
  for (auto y = z.rbegin(); y != z.rend(); ++y) {
    cout << *y;
  }
  cout << endl;
  for (int i = 0; i < n; ++i) {
    cout << ".";
  }
  cout << endl;
  return 0;
}
