#include <bits/stdc++.h>
using namespace std;
bool isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' ||
      c == 'E' || c == 'I' || c == 'O' || c == 'U')
    return true;
  return false;
}
bool prime[1000001];
int spf[1000001];
vector<int> primes;
void sieve() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= 1000000; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= 1000000; i += p) {
        prime[i] = false;
        spf[i] = p;
      }
    }
  }
  for (int p = 2; p <= 1000000; p++)
    if (prime[p]) primes.push_back(p);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int fast_exp(long long int x, long long int n) {
  long long int ans = 1;
  while (n) {
    if (n & 1) ans *= x;
    n = n >> 1;
    ans *= x * x;
  }
  return ans;
}
long long int mod_exp(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  bool vis[n][n];
  memset(vis, false, sizeof vis);
  char p[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> p[i][j];
    }
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (p[i][j] == '.' && p[i - 1][j] == '.' && p[i + 1][j] == '.' &&
          p[i][j - 1] == '.' && p[i][j + 1] == '.') {
        p[i][j] = '#';
        p[i - 1][j] = '#';
        p[i + 1][j] = '#';
        p[i][j - 1] = '#';
        p[i][j + 1] = '#';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (p[i][j] == '.') {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
}
