n, m, k, t = map(int,input().split()) assert n != 1 or m != 1