#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, -1, 0, 1};
int dy[] = {1, 0, -1, 0};
bool check(string *s, int i, int j) {
  for (int x = 0; x < 4; x++)
    if (s[i + dx[x]][j + dy[x]] == '#') return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (s[i][j] == '.' && check(s, i, j)) {
        s[i][j] = '#';
        for (int x = 0; x < 4; x++) s[i + dx[x]][j + dy[x]] = '#';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (s[i][j] == '.') {
        cout << "NO";
        exit(0);
      }
    }
  }
  cout << "YES";
  return 0;
}
