solve valid number