#include <bits/stdc++.h>
using namespace std;
struct P {
  int i, j;
};
int cant = 1, n;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int kt = 0;
  cin >> n;
  vector<vector<char>> p(n + 2, vector<char>(n + 2, '#'));
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (int j = 1; j <= n; j++) {
      p[i][j] = s[j - 1];
      if (s[j - 1] == '.') kt++;
    }
  }
  if (kt % 5 != 0) {
    cout << "NO";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (p[i][j] == '.' && p[i][j + 1] == '.' && p[i][j - 1] == '.' &&
          p[i + 1][j] == '.' && p[i - 1][j] == '.') {
        p[i][j] = '#';
        p[i][j + 1] = '#';
        p[i][j - 1] = '#';
        p[i + 1][j] = '#';
        p[i - 1][j] = '#';
      }
    }
  }
  int fl = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (p[i][j] == '.') {
        fl = 0;
      }
    }
  }
  if (fl) {
    cout << "YES";
    exit(0);
  }
  cout << "NO";
}
