while(0<1)println{val i=BigInt(readLine) BigInt(9)to'Ϩ'find(j=>(""/:(0 to 59))(_+0+i/j.pow(_)%j)contains"14014011")get}