# Import the math module
import math
# Define a function that takes two numbers as arguments
def lcm(a, b):
# Use the gcd() method from the math module to find the GCD of the numbers
gcd = math.gcd(a, b)
# Calculate the LCM by dividing the product of the two numbers by the GCD
lcm = (a * b) // gcd
# Return the LCM
return lcm
# Get two numbers from the user
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
# Call the lcm() function and pass the numbers as arguments
result = lcm(num1, num2)
# Print the result
print(f"The LCM of {num1} and {num2} is {result}")