#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, i, n, j, flag = 0, mx = 0, mn = 1e9 + 7, c = 0;
  cin >> n;
  string s[n];
  for (i = 0; i < n; i++) cin >> s[i];
  for (i = 1; i < n - 1; i++) {
    for (j = 1; j < n - 1; j++) {
      if (s[i][j] == '.' && s[i][j - 1] == '.' && s[i][j + 1] == '.' &&
          s[i - 1][j] == '.' && s[i + 1][j] == '.') {
        s[i][j] = '#';
        s[i][j + 1] = '#';
        s[i][j - 1] = '#';
        s[i - 1][j] = '#';
        s[i + 1][j] = '#';
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (s[i][j] == '.') c = 1;
    }
  }
  if (c == 1)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
  }
  return 0;
}
