Problem broken down

constraints have been stated