#include <bits/stdc++.h>
using namespace std;
const int dx[] = {-1, 0, 0, 0, 1};
const int dy[] = {0, -1, 0, 1, 0};
int main() {
  int N;
  cin >> N;
  string S[50];
  for (int i = 0; i < N; i++) cin >> S[i];
  for (int i = 1; i < N - 1; i++)
    for (int j = 1; j < N - 1; j++) {
      bool ok = true;
      for (int k = 0; k < 5; k++)
        if (S[i + dx[k]][j + dy[k]] == '#') ok = false;
      if (ok)
        for (int k = 0; k < 5; k++) S[i + dx[k]][j + dy[k]] = '#';
    }
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++)
      if (S[i][j] == '.') {
        cout << "NO" << endl;
        return 0;
      }
  cout << "YES" << endl;
  return 0;
}
