#![allow(non_snake_case)] #![allow(unused_imports)] #![allow(unused_macros)] #![allow(clippy::needless_range_loop)] #![allow(clippy::comparison_chain)] #![allow(clippy::nonminimal_bool)] #![allow(clippy::neg_multiply)] #![allow(dead_code)] #![allow(clippy::collapsible_else_if)] use proconio::{ fastout, input, input_interactive, marker::{Chars, Usize1}, }; use std::cmp::Reverse; use std::collections::BinaryHeap; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}; use std::mem::swap; //const MOD: usize = 1e9 as usize + 7; const MOD: usize = 998244353; // const MOD: usize = 2147483647; #[macro_export] macro_rules! max { ($x: expr) => ($x); ($x: expr, $( $y: expr ),+) => { std::cmp::max($x, max!($( $y ),+)) } } #[macro_export] macro_rules! min { ($x: expr) => ($x); ($x: expr, $( $y: expr ),+) => { std::cmp::min($x, min!($( $y ),+)) } } fn main() { input! { S:Chars, T:Chars, } let mut Pa = 0; let mut Pb = 0; let mut Pab = 0; let mut Po = 0; for i in 0..2 { for j in 0..2 { if S[i] == 'A' && T[j] == 'B' { Pab += 1; } else if S[i] == 'A' || T[j] == 'A' { Pa += 1; } else if S[i] == 'B' || T[j] == 'B' { Pb += 1; } else { Po += 1; } } } println!("{} {} {} {}", Pa * 25, Pb * 25, Pab * 25, Po * 25); }