Function to check if for all prime ( i + j ) , a [ i ] [ j ] is prime
def checkIndex ( n , m , a ) : NEW_LINE INDENT for i in range ( n ) : NEW_LINE INDENT for j in range ( m ) : NEW_LINE DEDENT DEDENT