n, h, m, t = map(int, input().split()) r = ((n - 1) * t) + m print(h) print(r)