#include <bits/stdc++.h>
using namespace std;
template <class II, class SZ, class OI>
OI cpy_n(II _i, SZ _s, OI _o) {
  for (int_fast64_t _j = 1; _j <= _s; _j++) {
    *(_o++) = *_i;
    if (_j != _s) {
      _i++;
    }
  };
  return _o;
}
template <class T>
void slurp(vector<T>& v, int_least32_t n = 1000000000) {
  istream_iterator<T> i(cin);
  istream_iterator<T> eoi;
  ;
  if (n == 1000000000) {
    copy((i), (eoi), back_inserter((v)));
  } else {
    v.reserve(n);
    cpy_n(i, n, back_inserter((v)));
  }
}
template <class T, class U>
void slurp2(vector<T>& va, vector<U>& vb, int_least32_t n = 1000000000) {
  istream_iterator<T> a(cin);
  istream_iterator<T> eoa;
  ;
  istream_iterator<U> b(cin);
  istream_iterator<U> eob;
  ;
  if (n != 1000000000) {
    va.reserve(n);
    vb.reserve(n);
  }
  auto ao = back_inserter((va));
  auto bo = back_inserter((vb));
  for (int_fast64_t i = 1; i <= n; i++) {
    if (a == eoa) break;
    *(ao++) = *a;
    *(bo++) = *b;
    if (i != n) {
      a++;
      b++;
    }
  }
}
chrono::time_point<chrono::system_clock> start_time;
void do_thing(vector<string>& bs, int_fast64_t i, int_fast64_t j) {
  for (int_fast64_t int_least32_t = (i); int_least32_t <= (i + 2);
       int_least32_t++) {
    if (bs[int_least32_t][j + 1] != '.') {
      return;
    }
  }
  for (int_fast64_t jj = (j); jj <= (j + 2); jj++) {
    if (bs[i + 1][jj] != '.') {
      return;
    }
  }
  for (int_fast64_t int_least32_t = (i); int_least32_t <= (i + 2);
       int_least32_t++) {
    bs[int_least32_t][j + 1] = '#';
  }
  for (int_fast64_t jj = (j); jj <= (j + 2); jj++) {
    bs[i + 1][jj] = '#';
  }
}
void do_it() {
  int_fast64_t n;
  cin >> n;
  vector<string> bs;
  slurp(bs, n);
  for (int_fast64_t i = (0); i <= (n - 3); i++) {
    for (int_fast64_t j = (0); j <= (n - 3); j++) {
      do_thing(bs, i, j);
    }
  }
  for (int_fast64_t i = (0); i <= (n - 1); i++) {
    for (int_fast64_t j = (0); j <= (n - 1); j++) {
      if (bs[i][j] != '#') {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
}
void start() { start_time = chrono::system_clock::now(); }
void end() {
  chrono::time_point<chrono::system_clock> end_time;
  end_time = chrono::system_clock::now();
  chrono::duration<double> diff = end_time - start_time;
  cerr << fixed << setprecision(4) << diff.count() << "s" << endl;
}
void do_mult() {
  int_least32_t times;
  cin >> times;
  for (int_fast64_t i = 1; i <= times; i++) {
    do_it();
  }
}
int main() {
  ios::sync_with_stdio(false);
  start();
  do_it();
  end();
  return 0;
}
