Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. n = int(input())
  2. IsDividable = False
  3. if n % 8 == 0 or n % 5 == 0 or n % 3 == 0:
  4. IsDividable = True
  5. else:
  6. while n > 7:
  7. n -= 8
  8. if n % 5 == 0:
  9. IsDividable = True
  10. elif n % 3 == 0:
  11. IsDividable = True
  12. if IsDividable == True:
  13. print('YES')
  14. else:
  15. print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement