using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { static class Program { static void Main() { Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }); int N; int M; long K; long P; long Q; Multi(out N, out M, out K,out P,out Q); long milk = 0; long kit = 0; for(int i = 0; i < N; i++) { if (i < M) { milk += GetLong(); } else { kit += GetLong(); } } long mod = 1000000007; long R = (kit + milk)*GetInv(2,mod)%mod + (milk-kit)*GetInv(2,mod)* ModPow(((Q - 2 * P) * GetInv(Q, mod) % mod), K, mod) % mod; Console.WriteLine(R); Console.Out.Flush(); Console.ReadKey(); } static long GetInv(long a, long mod) { return ModPow(a, mod - 2, mod); } static long ModPow(long a, long n, long mod) { long res = 1; while (n > 0) { if ((n & 1) == 1) { res = res * a % mod; } a = a * a % mod; ; n >>= 1; } return res; } static public string GetStr() { return Console.ReadLine().Trim(); } static public int GetInt() { return int.Parse(Console.ReadLine()); } static public long GetLong() { return long.Parse(Console.ReadLine()); } static public string[] GetStrArray() { return Console.ReadLine().Split(' '); } static public int[] GetIntArray() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); } static public long[] GetLongArray() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); } static public char[] GetCharArray() { return Console.ReadLine().Split(' ').Select(char.Parse).ToArray(); } static public List GetDoubleList() { return Console.ReadLine().Split(' ').Select(double.Parse).ToList(); } static public void WriteObjects(IEnumerable values) { foreach (var o in values) { Console.Write(o + " "); } } static string yesno(this bool b) { return b ? "yes" : "no"; } static string YesNo(this bool b) { return b ? "Yes" : "No"; } static string YESNO(this bool b) { return b ? "YES" : "NO"; } static bool eq() => typeof(T).Equals(typeof(U)); static T ct(U a) => (T)Convert.ChangeType(a, typeof(T)); static T cv(string s) => eq() ? ct(int.Parse(s)) : eq() ? ct(long.Parse(s)) : eq() ? ct(double.Parse(s)) : eq() ? ct(s[0]) : ct(s); static void Multi(out T a) => a = cv(GetStr()); static void Multi(out T a, out U b) { var ar = GetStrArray(); a = cv(ar[0]); b = cv(ar[1]); } static void Multi(out T a, out U b, out V c) { var ar = GetStrArray(); a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); } static void Multi(out T a, out U b, out V c, out W d) { var ar = GetStrArray(); a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); d = cv(ar[3]); } static void Multi(out T a, out U b, out V c, out W d,out X e) { var ar = GetStrArray(); a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); d = cv(ar[3]);e = cv(ar[4]); } } }