#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<vector<char> > c(n, vector<char>(n));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> c[i][j];
    }
  }
  map<pair<long long, long long>, long long> used;
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (c[i][j] == '.' && c[i + 1][j] == '.' && c[i - 1][j] == '.' &&
          c[i][j + 1] == '.' && c[i + 1][j] == '.' && c[i][j - 1] == '.' &&
          !used[{i - 1, j}] && !used[{i, j - 1}]) {
        used[{i, j}]++;
        used[{i, j + 1}]++;
        used[{i + 1, j}]++;
        used[{i - 1, j}]++;
        used[{i, j - 1}]++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if (c[i][j] == '.' && !used[{i, j}]) {
        cout << "NO";
        return 0;
      }
  }
  cout << "YES";
  return 0;
}
