LearnPy Hub
← Modules & the Standard Library problems
Easy

GCD and LCM

Read two positive integers and print their GCD and LCM using the math module.

Input

Two integers.

Output

gcd lcm

Sample 1

Input
12
18
Output
6 36

Sample 2

Input
7
5
Output
1 35
solution.py
Output appears here
GCD and LCM · Python practice problem · LearnPy Hub