solved 193: could improve by using mobius function