import math, sequtils, strutils let n: int = stdin.readline.parseInt a: seq[int] = mapIt(0..n, stdin.readline.parseInt) b: seq[int] = mapIt(0..n, stdin.readline.parseInt) mods = 10 ^ 9 + 7 var ans = 0 for i in 0..n: for j in 0..(n - i): ans += a[i] * b[j] ans = ans mod mods echo ans