from math import gcd
def zadanie1():
path = "input/ulamki.txt"
with open(path, "r") as file:
ulamki = [list(map(int, str.split(" "))) for str in file.read().split("\n")]
with open("skrocone.txt", "w") as out_file:
for ulamek in ulamki:
dzielnik = gcd(ulamek[0], ulamek[1])
ulamek[0] //= dzielnik
ulamek[1] //= dzielnik
print(f"{ulamek[0]} {ulamek[1]}", file=out_file)