To make the kingdom more prosperous, Pisces decides to ally with the elves living in the forest. However, the elven elders want to test Pisces, so they give him a simple question. Given a DAG with \(n\) nodes and \(m\) edges, the elven elders want to know the value of \(\sum^n_{i=1}\sum^n_{j=1}count(i,j)\cdot a_i\cdot b_j\) mod \(1e9 + 7\), where \(count(x,y)\) is defined by the number of different paths from \(x\) to \(y\) and \(count(x,x)\) = 0, and \(a\), \(b\) are \(2\) given arrays. It is too hard for Pisces to answer this question, so he turns to you for help.