Mrs Hudson have not famous pancake finally decide she learn m new recipe recently can not wait try those recipe base n special spice Mrs Hudson spice kitchen lie jar number integer 0 n1 spice lie individual jar each jar price correspond spice inscribe integer aiWe know value ith pancake recipe di si ci here di ci integer si pattern integer write numeral system radix di the pattern contain digit latin letter denote digit large question mark Number x dibase numeral system match pattern si replace question mark pattern digit letter obtain number x lead zero are not take consideration perform comparison more formally question mark replace exactly digit exactly letter if replace question mark number lead zeroes delete zero for example number 40a9875 11base numeral system match pattern 4987 number 4a9875 notTo pancake ith recipe Mrs Hudson jar number representation dibase numeral system match pattern si the control number recipe zi define sum number ci product price take jar More formally j number representation dibase numeral system match pattern siMrs Hudson is not interested control number minimum prime divisor your task recipe find minimum prime divisor number zi if divisor exceed 100 find print 1