import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); char[][] s = new char[n][n]; for (int i = 0; i < n; i++) { s[i] = sc.next().toCharArray(); } sc.close(); if (n % 2 == 1) { System.out.println("Yes"); return; } int cnt = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (s[i][j] == '#') { cnt++; } } } if (cnt % 2 == 0) { System.out.println("Yes"); } else { System.out.println("No"); } } }