#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
map<long long, long long> mp, pm;
map<char, long long> hs;
deque<long long> v, vc, ve, vv, vd;
deque<char> p, pe;
deque<string> ts, ss, st;
deque<double> sd, ds;
long long a, b, c, d, e, f, cnt, ans, r, n, l, x, y;
long double q, t, cnt1, cnt2;
string g, h, w, o, m, s;
char z, u;
bool re, rt;
vector<pair<long long, long long> > pr, rp, pp;
map<pair<long long, long long>, long long> aw, wa;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin >> a;
  char arr[a][a];
  for (long long i = 0; i < a; i++) {
    cin >> g;
    for (long long j = 0; j < a; j++) arr[i][j] = g[j];
  }
  for (long long i = 1; i < a - 1; i++) {
    for (long long j = 1; j < a - 1; j++) {
      if (arr[i][j] == '.' and arr[i - 1][j] == '.' and arr[i + 1][j] == '.' and
          arr[i][j + 1] == '.' and arr[i][j - 1] == '.') {
        arr[i][j] = 'A';
        arr[i - 1][j] = 'A';
        arr[i + 1][j] = 'A';
        arr[i][j + 1] = 'A';
        arr[i][j - 1] = 'A';
      }
    }
  }
  cnt = 0;
  for (long long i = 0; i < a; i++) {
    for (long long j = 0; j < a; j++) {
      if (arr[i][j] == '.') cnt++;
    }
  }
  if (cnt == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
