import strutils, sequtils, math let read = iterator: string {.closure.} = while true: for s in stdin.readLine.split: yield s proc main() = let n, m = read().parseInt var v = newSeqWith(n, read().parseInt) r = newSeqWith(n, read().parseInt) let A, B = read().parseInt const mo: int64 = 1000000007 let vsum = v.sum rsum = r.sum var dp = newSeq[int64](vsum + 1) ep = newSeq[int64](rsum + 1) dp[0] = 1 for i in 0..