import std; void main () { int N = readln.chomp.to!int; auto A = new string[](N); foreach (i; 0 .. N) { A[i] = readln.chomp; } int b = 0; foreach (i; 0 .. N) { foreach (j; 0 .. N) { if (A[i][j] == '#') { b++; } } } bool ok = true; if (N % 2 == 0 && b % 2 == 1) { ok = false; } if (ok) { writeln("Yes"); } else { writeln("No"); } } void read (T...) (string S, ref T args) { import std.conv : to; import std.array : split; auto buf = S.split; foreach (i, ref arg; args) { arg = buf[i].to!(typeof(arg)); } }