Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- nums = list(map(int, input().split()))
- n1 = max(nums)
- c = False
- S = []
- nums.remove(n1)
- for i in nums:
- if n1 % i != 0:
- S.append(i)
- c = True
- if c == False:
- n2 = max(nums)
- else:
- n2 = max(S)
- print(n1, n2)
Advertisement
Add Comment
Please, Sign In to add comment