#include <bits/stdc++.h>
using namespace std;
int lmt, f, chk, cnt;
void solve() {
  int n;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (s[i][j] == '.') {
        if (i + 2 >= n || j + 1 >= n || j - 1 < 0) {
          cout << "NO";
          return;
        }
        if (s[i + 1][j] == '.' && s[i + 2][j] == '.' &&
            s[i + 1][j + 1] == '.' && s[i + 1][j - 1] == '.') {
          s[i + 1][j] = '#', s[i + 2][j] = '#', s[i + 1][j + 1] = '#',
                s[i + 1][j - 1] = '#';
          continue;
        } else {
          cout << "NO";
          return;
        }
      }
    }
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
