If below expression return ( p - 1 ) then modular square root is not possible
if ( pow1 ( n , ( p - 1 ) / 2 , p ) == ( p - 1 ) ) : NEW_LINE INDENT print ( " no sqrt possible " ) ; NEW_LINE return - 1 ; NEW_LINE DEDENT