H, W, K = map(int, input().split())
MOD = 10 ** 9 + 7

Hd = sum([d * (H - d) * (W ** 2) for d in range(H)])
Wd = sum([d * (W - d) * (H ** 2) for d in range(W)])


# 階乗 & 逆元計算
factorial = [1]
inverse = [1]
for i in range(1, H * W + 2):
    factorial.append(factorial[-1] * i % MOD)
    inverse.append(pow(factorial[-1], MOD - 2, MOD))


ans = (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD
print(ans) H, W, K = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W K MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 d * (H - d) * (W ** 2) for d in range(H) for d in range(H) d range(H) range H for d in range(H) d * (H - d) * (W ** 2) d * (H - d) d H - d H d W ** 2 W 2 Hd = sum([d * (H - d) * (W ** 2) for d in range(H)]) Hd sum([d * (H - d) * (W ** 2) for d in range(H)]) sum [d * (H - d) * (W ** 2) for d in range(H)] d * (W - d) * (H ** 2) for d in range(W) for d in range(W) d range(W) range W for d in range(W) d * (W - d) * (H ** 2) d * (W - d) d W - d W d H ** 2 H 2 Wd = sum([d * (W - d) * (H ** 2) for d in range(W)]) Wd sum([d * (W - d) * (H ** 2) for d in range(W)]) sum [d * (W - d) * (H ** 2) for d in range(W)] factorial = [1] factorial [1] 1 inverse = [1] inverse [1] 1 for i in range(1, H * W + 2):
    factorial.append(factorial[-1] * i % MOD)
    inverse.append(pow(factorial[-1], MOD - 2, MOD)) i range(1, H * W + 2) range 1 H * W + 2 H * W H W 2 factorial.append(factorial[-1] * i % MOD) factorial.append factorial append factorial[-1] * i % MOD factorial[-1] * i factorial[-1] factorial -1 i MOD inverse.append(pow(factorial[-1], MOD - 2, MOD)) inverse.append inverse append pow(factorial[-1], MOD - 2, MOD) pow factorial[-1] factorial -1 MOD - 2 MOD 2 MOD ans = (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD ans (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] (Hd + Wd) * factorial[H * W - 2] Hd + Wd Hd Wd factorial[H * W - 2] factorial H * W - 2 H * W H W 2 inverse[K - 2] inverse K - 2 K 2 inverse[H * W - K] inverse H * W - K H * W H W K MOD print(ans) print ans MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD Hd = sum([d * (H - d) * (W ** 2) for d in range(H)]) sum([d * (H - d) * (W ** 2) for d in range(H)]) Hd H, W, K = map(int, input().split()) map(int, input().split()) H ans = (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD ans inverse = [1] [1] inverse Wd = sum([d * (W - d) * (H ** 2) for d in range(W)]) sum([d * (W - d) * (H ** 2) for d in range(W)]) Wd factorial = [1] [1] factorial W, K = map(int, input().split()) map(int, input().split()) W K = map(int, input().split()) map(int, input().split()) K
H, W, K = map(int, input().split())
MOD = 10 ** 9 + 7

Hd = sum([d * (H - d) * (W ** 2) for d in range(H)])
Wd = sum([d * (W - d) * (H ** 2) for d in range(W)])


# 階乗 & 逆元計算
factorial = [1]
inverse = [1]
for i in range(1, H * W + 2):
    factorial.append(factorial[-1] * i % MOD)
    inverse.append(pow(factorial[-1], MOD - 2, MOD))


ans = (Hd + Wd) * factorial[H * W - 2] * inverse[K - 2] * inverse[H * W - K] % MOD
print(ans)
