#B4042. The Impact of Execution Order

    ID: 11699 Type: Default 1000ms 256MiB

The Impact of Execution Order

The Impact of Execution Order

In many programming scenarios, the order of execution in a sequential structure is crucial. In this problem, two programmers, Small Y and Small L, write programs that follow different orders of operations on an input variable \(a\).

Small Y's Program:

  1. Input the variable \(a\).
  2. Add \(5\) to \(a\), i.e., update \(a = a + 5\).
  3. Triple the updated \(a\), i.e., update \(a = 3 \times a\).
  4. Output the current value of \(a\).

Small L's Program:

  1. Input the variable \(a\).
  2. Triple \(a\), i.e., update \(a = 3 \times a\).
  3. Add \(5\) to the result, i.e., update \(a = a + 5\).
  4. Output the current value of \(a\).

Given an integer \(a\), compute the outputs of both programs. Mathematically, the outputs are:

  • For Small Y: \(\; a_{Y} = 3 \times (a + 5) = 3a + 15 \).
  • For Small L: \(\; a_{L} = 3a + 5 \).

Your task is to output the two results in one line separated by a space, where the first number is the output of Small Y's program and the second is the output of Small L's program.

inputFormat

The input consists of a single integer \(a\) \( (-10^9 \le a \le 10^9)\). It is given on a single line.

outputFormat

Output two integers separated by a space: the result of Small Y's program and the result of Small L's program, respectively.

sample

0
15 5