numbers = input("Please enter two numbers: ")

# if numbers variable containers , split by , else split by space
if "," in numbers:
    numbers = numbers.split(",")
else:
    numbers = numbers.split(" ")
    
# exit if len(numbers) != 2
if len(numbers) != 2:
    print("Please enter two numbers")
    exit()
    
# convert to int
for i in range(len(numbers)):
    numbers[i] = int(numbers[i])
    
# calculate the average
average = sum(numbers) / len(numbers)

print(f"The average of {numbers[0]} and {numbers[1]} is {average}")