#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using R = double;
using Data = pair<ll, vector<int>>;
const ll MOD = 1e9 + 7;
const ll inf = 1LL << 50;
struct edge {
  ll from;
  ll to;
  ll cost;
};
int dat[55][55];
int n;
int check(vector<pair<int, int>> temp) {
  int ret = 1;
  for (int i = 0; i < 5; ++i) {
    int y = temp[i].first;
    int x = temp[i].second;
    if (0 <= y && y <= n - 1 && 0 <= x && x <= n - 1) {
      if (dat[y][x] == -1)
        continue;
      else
        ret = 0;
    } else
      ret = 0;
  }
  return ret;
}
void fi(vector<pair<int, int>> temp) {
  for (int i = 0; i < 5; ++i) {
    int y = temp[i].first;
    int x = temp[i].second;
    dat[y][x] = 1;
  }
}
int main() {
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; ++i) cin >> s[i];
  memset(dat, -1, sizeof(dat));
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (s[i][j] == '#') dat[i][j] = 1;
  for (int i = 0; i < n - 2; ++i)
    for (int j = 0; j < n; ++j) {
      if (dat[i][j] == -1) {
        vector<pair<int, int>> temp;
        temp.push_back({i, j});
        temp.push_back({i + 1, j - 1});
        temp.push_back({i + 1, j});
        temp.push_back({i + 1, j + 1});
        temp.push_back({i + 2, j});
        if (check(temp)) fi(temp);
      }
    }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      if (dat[i][j] != 1) {
        cout << "NO" << endl;
        return 0;
      }
    }
  cout << "YES" << endl;
  return 0;
}
