Driver code
int main ( ) { int a [ n ] [ m ] = { { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } } ; int b [ n ] [ m ] = { { 1 , 4 , 7 } , { 2 , 5 , 6 } , { 3 , 8 , 9 } } ; if ( check ( a , b ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }