#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int dx4[] = {-1, 0, 1, 0};
const int dy4[] = {0, 1, 0, -1};
const int dx8[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const int dxk[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyk[] = {-1, 1, -2, 2, -2, 2, -1, 1};
inline long long Int() {
  long long inputNumber = 0;
  char c = getchar_unlocked();
  bool sign = true;
  while (!((c >= '0' && c <= '9') || c == '-')) c = getchar_unlocked();
  if (c == '-') sign = false, c = getchar_unlocked();
  while (c >= '0' && c <= '9')
    inputNumber = (inputNumber << 1) + (inputNumber << 3) + c - '0',
    c = getchar_unlocked();
  return sign ? inputNumber : -inputNumber;
}
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& Pair) {
  out << '{' << Pair.first << ", " << Pair.second << '}';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& Vector) {
  out << '[';
  for (int i = 0; i < (int)Vector.size(); ++i) {
    out << Vector[i];
    if (i + 1 < (int)Vector.size()) out << ", ";
  }
  out << ']';
  return out;
}
template <class S, class T>
ostream& operator<<(ostream& out, const map<S, T>& Map) {
  out << "[\n";
  for (const auto& x : Map) {
    out << "{ Key: " << x.first << " , Value: " << x.second << " }\n";
  }
  out << "]\n";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const multiset<T>& Set) {
  out << '{';
  for (auto it = Set.begin(); it != Set.end();) {
    out << *it;
    it++;
    if (it != Set.end()) out << ", ";
  }
  out << '}';
  return out;
}
void solve();
int main() { solve(); }
const double eps = 1e-10;
const int mod = 1e9 + 7;
const int N = 55;
int n;
char mat[N][N];
void solve() {
  n = Int();
  for (int i = 1; i <= (n); ++i) scanf("%s", mat[i] + 1);
  for (int i = 2; i < n; ++i) {
    for (int j = 2; j < n; ++j) {
      if (mat[i][j] == '#') continue;
      bool can = true;
      for (int k = 0; k < (4); ++k) {
        int x = i + dx4[k], y = j + dy4[k];
        if (mat[x][y] == '#') {
          can = false;
          break;
        }
      }
      if (can) {
        mat[i][j] = '#';
        for (int k = 0; k < (4); ++k) {
          int x = i + dx4[k], y = j + dy4[k];
          mat[x][y] = '#';
        }
      }
    }
  }
  for (int i = 1; i <= (n); ++i)
    for (int j = 1; j <= (n); ++j)
      if (mat[i][j] != '#') {
        puts("NO");
        return;
      }
  puts("YES");
}
