a, b, c, d = map(int, input().split()) if a == b and a == c: if c == 2: if d < 1: print(-1) else: print(2, 1) print(0, 1) else: if d < c: print(-1) else: print(c, c) for i in range(0, c): print(i, (i + 1) % c) elif a == c: c0 = list(range(2, c + 1)) c1 = [0] if b - c > 1: c1 += list(range(c + 1, b)) if len(c0) + len(c1) > d: print(-1) else: print(b, len(c0) + len(c1)) for k in c0: print(0, k) for k in c1: print(1, k) elif b == c: c1 = list(range(2, c + 1)) c0 = [1] if a - c > 1: c0 += list(range(c + 1, a)) if len(c0) + len(c1) > d: print(-1) else: print(a, len(c0) + len(c1)) for k in c0: print(0, k) for k in c1: print(1, k) elif c == 0: c0 = [] c1 = [] n = 2 if a > 1: c0 += range(n, n + a - 1) n += a - 1 if b > 1: c1 += range(n, n + b - 1) n += b - 1 if len(c0) + len(c1) > d: print(-1) else: print(n, len(c0) + len(c1)) for k in c0: print(0, k) for k in c1: print(1, k) else: c0 = [2] c1 = [2] c2 = list(range(3, c + 2)) n = c + 2 if a - c - 1 > 0: c0 += range(n, n + a - c - 1) n += a - c - 1 if b - c - 1 > 0: c1 += range(n, n + b - c - 1) n += b - c - 1 if len(c0) + len(c1) + len(c2) > d: print(-1) else: print(n, len(c0) + len(c1) + len(c2)) for k in c0: print(0, k) for k in c1: print(1, k) for k in c2: print(2, k)