Nikolai assigned students the task of creating a RACI matrix for a project during management lectures. This is a responsibility assignment matrix that lists all stakeholders of the project and their levels of involvement in different tasks. The levels are denoted by the letters "R", "A", "C", and "I". If there is no involvement, "-" is used. The levels of involvement have the following meaning:
Help the students verify the correctness of the matrix.
The first line contains two integers $$$n$$$ and $$$m$$$: the number of rows and columns of the RACI matrix ($$$1 \le n, m \le 100$$$).
Next, $$$n$$$ rows are listed, each containing $$$m$$$ elements separated by spaces.
Each row represents a task, and each column corresponds to a stakeholder.
Each element of the matrix can be either an uppercase letter "R", "A", "C", or "I", or a minus sign, "-", indicating that the given stakeholder has no level of involvement in this task.
Print "Yes" if the matrix is correct, or "No" otherwise. Letter case does not matter.
3 5C C A - IA R - C IA R I C -
Yes
3 3A - CR C I- A I
No