Language: C++

use std::io::{stdin, BufRead, BufReader};

fn main(){
    let input = BufReader::new(stdin());

    for line in input.lines(){
        
        let v: Vec<f32> = line.unwrap().split_whitespace().filter_map(|x| x.parse::<f32>().ok()).collect();
        
        println!("{:.3} {:.3}", (v[2]*v[4]-v[1]*v[5])/(v[0]*v[4]-v[1]*v[3]),(v[2]*v[3]-v[0]*v[5])/(v[1]*v[3]-v[0]*v[4]));
    }
}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);



Compiler output:
a.cc:16:2: error: invalid preprocessing directive #[
   16 | #[allow(unused_imports)]
      |  ^
a.cc:18:2: error: invalid preprocessing directive #[
   18 | #[allow(unused_imports)]
      |  ^
a.cc:30:14: error: too many decimal points in number
   30 |     for _ in 0..n {
      |              ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::{stdin, BufRead, BufReader};
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main(){
      | ^~
a.cc:17:1: error: 'use' does not name a type
   17 | use std::cmp::{max, min};
      | ^~~
a.cc:20:1: error: 'pub' does not name a type
   20 | pub trait FromLn {
      | ^~~
a.cc:23:1: error: 'pub' does not name a type
   23 | pub fn readln<T: FromLn>() -> T {
      | ^~~
a.cc:28:1: error: 'pub' does not name a type
   28 | pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
      | ^~~
a.cc:35:1: error: 'macro_rules' does not name a type
   35 | macro_rules! fromln_primitives {
      | ^~~~~~~~~~~
a.cc:44:1: error: 'fromln_primitives' does not name a type
   44 | fromln_primitives!(
      | ^~~~~~~~~~~~~~~~~
a.cc:60:1: error: 'impl' does not name a type
   60 | impl<T> FromLn for Vec<T>
      | ^~~~
a.cc:68:1: error: 'impl' does not name a type
   68 | impl FromLn for Vec<char> {
      | ^~~~
a.cc:73:1: error: 'macro_rules' does not name a type
   73 | macro_rules! fromln_tuple {
      | ^~~~~~~~~~~
a.cc:85:1: error: 'fromln_tuple' does not name a type
   85 | fromln_tuple!(A, B);
      | ^~~~~~~~~~~~
a.cc:86:1: error: 'fromln_tuple' does not name a type
   86 | fromln_tuple!(A, B, C);
      | ^~~~~~~~~~~~
a.cc:87:1: error: 'fromln_tuple' does not name a type
   87 | fromln_tuple!(A, B, C, D);
      | ^~~~~~~~~~~~
a.cc:88:1: error: 'fromln_tuple' does not name a type
   88 | fromln_tuple!(A, B, C, D, E);
      | ^~~~~~~~~~~~
a.cc:89:1: error: 'fromln_tuple' does not name a type
   89 | fromln_tuple!(A, B, C, D, E, F);
      | ^~~~~~~~~~~~