#[allow(unused_imports)]
use std::{
    collections::{HashMap, HashSet, BinaryHeap, VecDeque, BTreeSet, BTreeMap},
    io::{read_to_string, stdin, Write, stdout},
};

use proconio::{input, fastout, marker::Chars};


pub fn modulo(x: i64, y: i64)->i64{
    (x%y+y)%y
}

pub fn gcd(a: i64, b: i64)->i64{
    if b==0{
        a
    } else {
        gcd(b, modulo(a, b))
    }
}

//#[fastout]
fn main(){
    input!{
        a: [i64; 4],
	}
    let mut g = 0;
    let d = (a[0]*a[3]-a[1]*a[2]).abs();
    for &v in &a{
        g = gcd(g, v);
    }
    g = g.abs();
    if g==0{
        println!("0 0");
    } else {
        println!("{} {}", g, d/g);
    }
}