import java.util.*;
public class NAME{
public static void main(String[] args) {
Scanner Keyboard = new Scanner(System.in);
int a,b,c,d ;
int x=0,y=0;
while(Keyboard.hasNext()){
a = Keyboard.nextInt();
b = Keyboard.nextInt();
c = Keyboard.nextInt();
d = Keyboard.nextInt();
if(d%c==0)
System.out.println(a+" "+b+" "+c+" "+d+" "+(d*d/c));
else
System.out.println(a+" "+b+" "+c+" "+d+" "+(d+d-c));
}
}
}