#include <bits/stdc++.h>
using namespace std;
int n;
vector<vector<char> > g;
vector<vector<bool> > used;
bool ok(int i, int j) {
  if (g[i][j] == '.' && g[i - 1][j] == '.' && g[i + 1][j] == '.' &&
      g[i][j - 1] == '.' && g[i][j + 1] == '.') {
    if (!used[i][j])
      used[i][j] = true;
    else
      return false;
    if (!used[i - 1][j])
      used[i - 1][j] = true;
    else {
      used[i][j] = false;
      return false;
    }
    if (!used[i + 1][j])
      used[i + 1][j] = true;
    else {
      used[i][j] = false;
      used[i - 1][j] = false;
      return false;
    }
    if (!used[i][j - 1])
      used[i][j - 1] = true;
    else {
      used[i][j] = false;
      used[i - 1][j] = false;
      used[i + 1][j] = false;
      return false;
    }
    if (!used[i][j + 1])
      used[i][j + 1] = true;
    else {
      used[i][j] = false;
      used[i - 1][j] = false;
      used[i + 1][j] = false;
      used[i][j - 1] = false;
      return false;
    }
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  g.resize(n, vector<char>(n));
  used.resize(n, vector<bool>(n, false));
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    for (__typeof(n) j = (0) - ((0) > (n)); j != (n) - ((0) > (n));
         j += 1 - 2 * ((0) > (n))) {
      cin >> g[i][j];
      if (g[i][j] == '#') used[i][j] = true;
    }
  }
  for (__typeof(n - 1) i = (1) - ((1) > (n - 1));
       i != (n - 1) - ((1) > (n - 1)); i += 1 - 2 * ((1) > (n - 1))) {
    for (__typeof(n - 1) j = (1) - ((1) > (n - 1));
         j != (n - 1) - ((1) > (n - 1)); j += 1 - 2 * ((1) > (n - 1))) {
      ok(i, j);
    }
  }
  bool br = false;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    for (__typeof(n) j = (0) - ((0) > (n)); j != (n) - ((0) > (n));
         j += 1 - 2 * ((0) > (n))) {
      if (!used[i][j]) {
        cout << "NO";
        br = true;
        break;
      }
    }
    if (br) break;
  }
  if (!br) cout << "YES";
  return 0;
}
