R=range I=input A=[] for i in R(5):A+=I().split() t=1<<12 S=[17043521,1118480,4329631,33061951,33088575] for i in R(5):S+=[31<