#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  long long n;
  cin >> n;
  long long x[4] = {1, 1, 1, 2}, y[4] = {-1, 0, 1, 0};
  vector<string> a(n);
  for (long long i = 0; i < (long long)n; i++) cin >> a[i];
  for (long long i = 0; i < (long long)n; i++)
    for (long long j = 0; j < (long long)n; j++)
      if (a[i][j] == '.') {
        if (i > n - 3 || j == n - 1 || j == 0) {
          cout << "NO";
          return 0;
        }
        for (long long h = 0; h < (long long)4; h++) {
          if (a[i + x[h]][j + y[h]] == '#') {
            cout << "NO";
            return 0;
          }
          a[i + x[h]][j + y[h]] = '#';
        }
      }
  cout << "YES";
  return 0;
}
