naive prime checker