#[allow(unused_imports)] use std::{ collections::*, cmp::*, mem::swap, time::Instant, io::{self, stdin, Read, read_to_string}, hash::Hash, }; #[allow(unused_imports)] use proconio::{input, input_interactive, marker::{*}}; #[allow(unused_imports)] //use rand::{thread_rng, Rng, seq::SliceRandom}; #[allow(unused_imports)] //use ac_library::{*}; #[allow(dead_code)] const INF: i64 = 1<<60; #[allow(dead_code)] const MOD: i64 = 998244353; #[allow(dead_code)] const D: [(usize, usize); 4] = [(1, 0), (0, 1), (!0, 0), (0, !0)]; //use proconio::fastout; //#[fastout] fn main(){ input!{ a: i64, b: i64, } match b%3{ 0 => { println!("0 {}", a); }, 1 => { println!("{} 0", a); }, _ => { println!("{} {}", -a, -a); } } }