Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. a = input()
  2. a = a.replace('-', '')
  3. a = a.replace('+', '')
  4. a = a.replace('(', '')
  5. a = a.replace(')', '')
  6. if len(a) == 11:
  7. a = a[1:]
  8. elif len(a) == 7:
  9. a = '495' + a
  10. for i in range(3):
  11. k = input()
  12. k = k.replace('-', '')
  13. k = k.replace('+', '')
  14. k = k.replace('(', '')
  15. k = k.replace(')', '')
  16. if len(k) == 11:
  17. k = k[1:]
  18. elif len(k) == 7:
  19. k = '495' + k
  20. if k == a:
  21. print('YES')
  22. else:
  23. print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement