• + 0 comments

    def solve(a, m): # Write your code here

    p=int(((m-1)/2))
    l=(a**p)%m
    if l==1:
        return "YES"
    return "NO"
        why is this giving over time