#include <bits/stdc++.h>
using namespace std;
int n, k;
bool sol[4][101];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int j = 1; j <= 2; j++)
    for (int i = 2; i <= n / 2; i++)
      if (k > 1) k -= 2, sol[j][i] = sol[j][n - i + 1] = 1;
  for (int j = 1; j <= 2; j++)
    if (k >= 1) k--, sol[j][n / 2 + 1] = 1;
  cout << "YES" << '\n';
  for (int i = 0; i <= 3; i++) {
    for (int j = 1; j <= n; j++) cout << (sol[i][j] ? "#" : ".");
    cout << '\n';
  }
  return 0;
}
