var i = readLine()?.split(separator: " ").map{Int($0)!} var (a,b,x,n) = (i![0],i![1],i![2],i![3]) (a*x+b)%2==0 ? print(Int(n/2),0) : print(0,Int(n/2))