use std::collections::{BTreeSet, HashMap}; fn main() { let mut temp = String::new(); std::io::stdin().read_line(&mut temp).ok(); let temp: Vec<&str> = temp.trim().split_whitespace().collect(); let tset = temp.iter().copied().collect::>(); let mut mapping = HashMap::new(); for (i, &v) in tset.iter().enumerate() { mapping.insert(v, i); } let a = (0..6).map(|i| *mapping.get(&temp[i]).unwrap()).collect::>(); for i in 0..1<> a[j]) & 1) == 1).collect::>(); if !(!(!(flgs[0] && flgs[1]) && flgs[2]) && !(!(flgs[3] && flgs[4]) && flgs[5])) { println!("YES"); return; } } println!("NO"); }