a,b=map(int,input().split()) n,k=map(int,input().split()) mod=10**9+7 FACT=[1] for i in range(1,3*10**5+1): FACT.append(FACT[-1]*i%mod) FACT_INV=[pow(FACT[-1],mod-2,mod)] for i in range(3*10**5,0,-1): FACT_INV.append(FACT_INV[-1]*i%mod) FACT_INV.reverse() def Combi(a,b): if 0<=b<=a: return FACT[a]*FACT_INV[b]%mod*FACT_INV[a-b]%mod else: return 0 print((Combi(n-1,k-1)*a+Combi(n-1,k-2)*b)%mod) ANS=0 for k in range(1,n+2): ANS+=((Combi(n-1,k-1)*a+Combi(n-1,k-2)*b)%mod)**2 ANS%=mod print(ANS)