import strscans proc divOrDefault(n, m, def: int): int = if m == 0: def else: n div m let (_, a, b, c, d) = stdin.readAll.scanTuple"$i $i $i $i" x = divOrDefault(c, a, 10000) y = divOrDefault(d, b, 10000) echo min(x, y)