#include <bits/stdc++.h>
using namespace std;
bool check(int i, int j, vector<string> grid) {
  bool flag = 1;
  flag &= (grid[i][j] == '.');
  flag &= (grid[i + 1][j] == '.');
  flag &= (grid[i - 1][j] == '.');
  flag &= (grid[i][j + 1] == '.');
  flag &= (grid[i][j - 1] == '.');
  return flag;
}
void solve() {
  int n;
  cin >> n;
  vector<string> grid(n);
  for (auto &el : grid) cin >> el;
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (grid[i][j] == '.' && check(i, j, grid)) {
        grid[i][j] = '#';
        grid[i + 1][j] = '#';
        grid[i - 1][j] = '#';
        grid[i][j + 1] = '#';
        grid[i][j - 1] = '#';
      }
    }
  }
  for (auto &el : grid) {
    for (auto &x : el) {
      if (x == '.') {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
}
int main() { solve(); }
