num = int(input("Enter a number: ")) rnum = num num_mod = num % 2 dnum_mod = num % 3 fnum_mod = num % 5 if num_mod != 0 and dnum_mod != 0 and fnum_mod != 0 and rnum != 2: print(rnum, "is a prime number") else: print(rnum, "is not a prime number")