def test(n):
    if 2**(n-1)%n == 1:
        return True
    else:
        return False
