Orchard

No attempts yetTime limit1sMemory limit128 MB

Problem

Old Bajtazar owns an orchard where the apple trees bear fruit of pure gold. The work is hard and he no longer has the strength he once had, so he decided to cut the orchard into parcels and hand them to his sons. He wants every son to live well, so each parcel has to hold at least one of the precious apple trees.

The orchard is a square with side nn meters. Put a coordinate system on it so that the lower left corner of the orchard is (0,0)(0, 0) and the upper right corner is (n,n)(n, n). For every unit square we know whether an apple tree grows there. Each parcel has to be a rectangle whose four sides lie on grid lines. Parcels may not overlap, they may only touch along a side or at a corner, and together they have to cover the whole orchard with no gap. The size of a parcel does not matter. Every parcel only has to hold at least one apple tree.

Bajtazar has kk sons. Decide whether the orchard can be cut into exactly kk parcels under these rules.

Input

The first line contains the side length of the orchard nn and the number of sons kk (1n10001 \le n \le 1000, 1kn21 \le k \le n^2).

Each of the next nn lines describes one row of unit squares and holds nn characters x and .. An x is a square with an apple tree, a . is a square without one.

Output

Print YES on the first line if the orchard can be cut into exactly kk parcels under these rules, and NO if it cannot.

Hint

The picture below shows the orchard of the first example cut into five parcels. An X marks a square with an apple tree.