Driver Code
int main ( ) { int a [ N ] [ M ] = { { 1 , 2 , 3 , 4 , 2 } , { 0 , 1 , 2 , 3 , 34 } , { 0 , 34 , 21 , 12 , 12 } , { 1 , 2 , 3 , 6 , 6 } } ; int sum = takeSum ( a ) ; if ( isPrime ( sum ) ) cout << " YES " << endl ; else cout << " NO " << endl ; return 0 ; }