#include <bits/stdc++.h>
using namespace std;
const int MAX = 54;
int matr[MAX][MAX];
bool tryIn(int x, int y) {
  int f = 0;
  if (matr[y][x] == 1 && matr[y + 1][x - 1] == 1 && matr[y + 1][x] == 1 &&
      matr[y + 1][x + 1] == 1 && matr[y + 2][x] == 1) {
    matr[y][x] = 2;
    matr[y + 1][x - 1] = 2;
    matr[y + 1][x] = 2;
    matr[y + 1][x + 1] = 2;
    matr[y + 2][x] = 2;
    return true;
  } else {
    return false;
  }
}
void solve() {
  int n;
  cin >> n;
  char c;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      cin >> c;
      if (c == '.') {
        matr[i][j] = 1;
      } else if (c == '#') {
        matr[i][j] = 2;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (matr[i][j] == 1 && !tryIn(j, i)) {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  int test = 1;
  while (test-- > 0) {
    solve();
  }
  return 0;
}
