#include <bits/stdc++.h>
using namespace std;
long long i = 0, j = 0, k = 0, cnt = 0, sum = 0, start = 0, finall = 0,
          maxi = 0, mini = 1000000007, len = 0, cnt1 = 0, cnt2 = 0, ans = 0,
          cnt3 = 0, eend = 0, pos = 0;
int flag = 0;
char arr[51][51];
long long brr[51];
long long crr[51];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tests = 1;
  while (tests--) {
    int n;
    cin >> n;
    long long dy[4] = {-1, 0, 1, 0};
    long long dx[4] = {1, 1, 1, 2};
    int a = 0;
    for (i = 1; i <= n; i++) {
      string s;
      cin >> s;
      for (j = 1; j <= n; j++) arr[i][j] = s[j - 1];
    }
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= n; j++) {
        if (arr[i][j] == '.') {
          for (k = 0; k < 4; k++) {
            int x = i + dx[k];
            int y = j + dy[k];
            if ((x >= 1 && x <= n) && (y >= 1 && y <= n) &&
                (arr[x][y] == '.')) {
              arr[x][y] = '#';
            } else {
              cout << "NO"
                   << "\n";
              return 0;
            }
          }
        }
      }
    }
    cout << "YES"
         << "\n";
  }
}
