#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int p_mod = 998244353;
using namespace std;
long long fast_pow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    b >>= 1;
    a = (a * a) % mod;
  }
  return res % mod;
}
const int N = 50 + 5;
int root[N], n;
void make_set() {
  for (int i = 1; i <= n; i++) root[i] = i;
}
int find_set(int x) {
  return root[x] == x ? root[x] : root[x] = find_set(root[x]);
}
bool union_set(int x, int y) {
  x = find_set(x);
  y = find_set(y);
  if (x == y) return false;
  return root[y] = root[x];
}
void fail(bool flag) {
  if (flag) {
    puts("NO");
    exit(0);
  } else
    cout << "YES" << endl;
}
char g[N][N];
int cnt;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  cin >> n;
  for (int(i) = 1; (i) <= (n); (i)++) {
    cin >> g[i] + 1;
    for (int(j) = 1; (j) <= (n); (j)++)
      if (g[i][j] == '#') cnt++;
  }
  for (int(i) = 1; (i) <= (n); (i)++) {
    for (int(j) = 1; (j) <= (n); (j)++) {
      if (g[i][j] == '#') continue;
      bool f = false;
      for (int u = -1; u <= 1; u++) {
        for (int v = -1; v <= 1; v++) {
          if (abs(u) + abs(v) > 1) continue;
          int xx = i + u, yy = j + v;
          if (xx > n || xx < 1 || yy > n || yy < 1 || g[xx][yy] != '.') {
            f = 1;
            break;
          }
        }
        if (f == 1) break;
      }
      if (!f) {
        for (int u = -1; u <= 1; u++) {
          for (int v = -1; v <= 1; v++) {
            if (abs(u) + abs(v) > 1) continue;
            int xx = i + u, yy = j + v;
            g[xx][yy] = '#';
          }
        }
        cnt += 5;
      }
    }
  }
  if (cnt == n * n)
    fail(0);
  else
    fail(1);
  return 0;
}
