HOMWRK

Time limit2sMemory limit512 MB

Summary
Read pairs of integers and print each pair's sum followed by its product on one line.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

In one of the beautiful cities of Afghanistan, two sisters are going to program a simple game to help them solve their mathematics homework. Their homework asks them to calculate the sum and the product of two numbers. Your task is to help them build a simple program for their homework.

Input

The first line contains the number of test cases (T).

T test cases follow. For each test case, the first line contains the number of problems N. The next N lines contain two integers Ai and Bi.

Output

For every input that takes two integers, print the sum of the two given numbers first and the product second, separated by a space.

Constraints

  • 1 ≤ T ≤ 10
  • 1 ≤ N ≤ 50
  • 0 ≤ Ai, Bi ≤ 20000

Examples1

  1. Example 1

    Input
    1
    2
    20 30
    40 60
    
    Expected output
    50 600
    100 2400