Problem:
Score : 100 points

Problem Statement

You are given two integers A and B.
Find the largest value among A+B, A-B and A \times B.

Constraints

-1000 \leq A,B \leq 1000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the largest value among A+B, A-B and A \times B.

Sample Input 1

3 1

Sample Output 1

4

3+1=4, 3-1=2 and 3 \times 1=3. The largest among them is 4.

Sample Input 2

4 -2

Sample Output 2

6

The largest is 4 - (-2) = 6.

Sample Input 3

0 0

Sample Output 3

0

Solution in Rust (1.15.1) (judge verdict: Accepted)

use std::io::stdin;
use std::io::BufRead;
use std::io::BufReader;

fn main() {

let mut scan = std::io::stdin();
 
let mut line = String::new();
 
let _ = scan.read_line(&mut line);
 
let vec: Vec<&str> = line.split_whitespace().collect();
 
let a: i32 = vec[0].parse().unwrap_or(0);
let b: i32 = vec[1].parse().unwrap_or(0);
//標準入力を読み込む

let add: i32 = a+b;
let sub: i32 = a-b;
let mul: i32 = a*b;
let mut max: i32 = add;

if sub>max {
    max = sub;
}
if mul>max {
    max = mul;
}

println!("{}", max);
}