
mi=k=0
for x in range(2079,43168):    
    if x%7==0:
        s=str(x)
        if ('0' in s) and ('2' in s) and ('5' in s):        
            k+=1
            if mi==0:
                mi=x
print(k,mi)
