twosum and median number