Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- x = int(input())
- d=2
- i=2
- flag1=False
- flag2=False
- while d % i != 0 and i <= d**0.5:
- i += 1
- else:
- flag1=True
- if flag1 and x>=2:
- while x % d != 0 and d <= x**0.5:
- d+=1
- if x % d != 0 and d >= x**0.5:
- print(x, 1)
- else:
- print(d)
Advertisement
Add Comment
Please, Sign In to add comment