SP31972 ADAPOWER - Ada and Power

Description

Ada the Ladybug got a new homework today. She was attending algebra class and teacher was lecturing about various utilizations of matrix multiplication. He wanted to teach his students about the power of matrix, so he gave them following homework: Students were given a matrix followed be multiple queries. The query of first kind is adding a number to each element of a rectangular region of their matrix. In the query of second kind, a matrix is given and students are asked, whether it is the second power of actual matrix. Can you help Ada to solve her homework? Input The first line contains two integers **1 , the size of square matrix and **1 , the number of queries.**** Each of the next **N** lines contains **N** integers **0 , the element on **x $ ^{th} $ ,y $ ^{th} $** coordinate of matrix.** Then **Q** queries follows: The query of first kind is **1** followed five integers **0 , specifing the part, to which the number will be added, and number **0 , the value which will be added.**** The query of second kind is **2** followed by **N** lines containing **N** integers, which are supposed to be the second power of actual matrix.

Input Format

N/A

Output Format

For each query of second kind, print either **yes**, if given matrix is second power of actual state of matrix or **no** in the other case.