using System; using System.Linq; public class P1004 { public static void Main() { var abxn = Console.ReadLine().Trim().Split(' ').Select(uint.Parse).ToList(); if(abxn[0] % 2 + abxn[1] % 2 == 2) { if(abxn[2] % 2 == 0) { Console.WriteLine(abxn[3] / 2 + " 0"); } else { Console.WriteLine("0 " + abxn[3] / 2); } } else if(abxn[0] % 2 == 0 && abxn[1] == 1) { Console.WriteLine(abxn[3] / 2 + " " + abxn[3] / 2); } else if(abxn[0] % 2 == 1 && abxn[1] == 0 && abxn[2] % 2 == 1) { Console.WriteLine(abxn[3] / 2 + " " + abxn[3] / 2); } else { Console.WriteLine("0 0"); } } }