CF924A Mystical Mosaic

Description

There is a rectangular grid of $ n $ rows of $ m $ initially-white cells each. Arkady performed a certain number (possibly zero) of operations on it. In the $ i $ -th operation, a non-empty subset of rows $ R_{i} $ and a non-empty subset of columns $ C_{i} $ are chosen. For each row $ r $ in $ R_{i} $ and each column $ c $ in $ C_{i} $ , the intersection of row $ r $ and column $ c $ is coloured black. There's another constraint: a row or a column can only be chosen at most once among all operations. In other words, it means that no pair of $ (i,j) $ ( $ i

Input Format

The first line contains two space-separated integers $ n $ and $ m $ $ (1

Output Format

If the given grid can be achieved by any valid sequence of operations, output "Yes"; otherwise output "No" (both without quotes). You can print each character in any case (upper or lower).

Explanation/Hint

For the first example, the desired setup can be produced by $ 3 $ operations, as is shown below. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF924A/74e6b77ab65d49c640ecfae7cdd0e283eea435f7.png)For the second example, the desired setup cannot be produced, since in order to colour the center row, the third row and all columns must be selected in one operation, but after that no column can be selected again, hence it won't be possible to colour the other cells in the center column.