n,m=map(int,input().split()) mod=10**9+7 ans=0 f=1 for i in range(n,m+1): ans+=f f*=i+1 f%=mod print(ans)