A,B,C,D,E = map(int,input().split()) together=[0]*(A+B)*(C+D) for t in range((A+B)*(C+D)): if t%(A+B)