Lewis Hamilton , a seven-time Formula 1 winner, has agreed to a multi-year contract with Ferrari, the two teams confirmed on Thursday. A legend of …