#B3853. Arithmetic Operation Check

    ID: 11510 Type: Default 1000ms 256MiB

Arithmetic Operation Check

Arithmetic Operation Check

Given three integers (a), (b), and (c) such that (b \neq 0), perform the following checks:

  • If \(a + b = c\), output plus.
  • If \(a - b = c\), output minus.
  • If neither condition holds, output illegal.
Note: The inputs are given in a single line separated by spaces.

inputFormat

A single line containing three integers (a), (b), and (c) separated by spaces. It is guaranteed that (b \neq 0).

outputFormat

Output a single word which is either plus (if (a + b = c)), minus (if (a - b = c)), or illegal (if neither condition is satisfied).

sample

1 2 3
plus