#B3792. Determining Ages

    ID: 11449 Type: Default 1000ms 256MiB

Determining Ages

Determining Ages

In this problem, you are given three integers representing ages and age differences. Specifically, you are given:

  • a: the age of Xiao A's father.
  • b: the difference in age between Xiao A's father and Xiao A (i.e., father is b years older than Xiao A).
  • c: the difference in age between Xiao A's grandmother and Xiao A's father (i.e., father is c years younger than his grandmother).

Your task is to determine the ages of Xiao A and his grandmother. The relationships can be written as:

$$\text{Xiao A's age} = a - b$$

$$\text{Grandmother's age} = a + c$$

inputFormat

The input consists of a single line containing three space-separated integers: a, b, and c.

outputFormat

Output two integers separated by a space: the age of Xiao A and the age of his grandmother.

sample

30 10 20
20 50