#include <bits/stdc++.h>
int main() {
  int n1;
  std::cin >> n1;
  std::vector<std::vector<char>> v1(n1 + 4, std::vector<char>(n1 + 4, '#'));
  for (int i = 2; i < n1 + 2; i++)
    for (int j = 2; j < n1 + 2; j++) std::cin >> v1[i][j];
  for (int i = 2; i < n1 + 2; i++)
    for (int j = 2; j < n1 + 2; j++) {
      if (v1[i][j] == '.') {
        if (v1[i + 1][j] == '.' && v1[i + 2][j] == '.' &&
            v1[i + 1][j - 1] == '.' && v1[i + 1][j + 1] == '.') {
          v1[i][j] = '#';
          v1[i + 1][j] = '#';
          v1[i + 2][j] = '#';
          v1[i + 1][j - 1] = '#';
          v1[i + 1][j + 1] = '#';
        } else {
          std::cout << "NO";
          return 0;
        }
      }
    }
  std::cout << "YES";
}
