Begin
var x, y, n, m: integer;
Readln(x, y, n, m);
Assert((x > 0) and (y > 0) and (n > 0) and (m > 0));
var upstep: integer := n + y;
for var i := 2 to m do
upstep *= (n + y);
var lowstep := x;
for var j := 2 to upstep do
lowstep *= x;
Writeln(lowstep);
end.