How should two nonnegative numbers be chosen so that their sum is 1 and the sum of their squares is as large as possible? As small as possible?