#include <bits/stdc++.h>
using namespace std;
void func(string *s, int n, int i, int j) {
  if (s[i - 1][j] == '.' && s[i + 1][j] == '.' && s[i][j - 1] == '.' &&
      s[i][j + 1] == '.') {
    s[i][j] = '#';
    s[i - 1][j] = '#';
    s[i + 1][j] = '#';
    s[i][j - 1] = '#';
    s[i][j + 1] = '#';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (a[i][j] == '.') func(a, n, i, j);
    }
  }
  int count = n * n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == '#') count--;
    }
  }
  if (count != 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
