The two programs for homework1