#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  char arr[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int co = 0;
      if (arr[i][j] == '.') {
        if (j + 1 < n)
          if (arr[i][j + 1] == '.') co++;
        if (j - 1 >= 0)
          if (arr[i][j - 1] == '.') co++;
        if (i + 1 < n)
          if (arr[i + 1][j] == '.') co++;
        if (i - 1 >= 0)
          if (arr[i - 1][j] == '.') co++;
      }
      if (co == 4) {
        arr[i][j + 1] = '#';
        arr[i][j - 1] = '#';
        arr[i + 1][j] = '#';
        arr[i - 1][j] = '#';
        arr[i][j] = '#';
      }
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i][j] == '.') flag = false;
    }
  }
  if (flag)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
}
