Solution to THE RATING GAME:
import java.util.;
import java.lang.;
import java.io.*;
import java.util.stream.Stream;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
static List compareTriplets(List a, List b) {
int n = 3;
List ans = new ArrayList<>();
int ascore=0,bscore=0;
for (int i = 0; i < n; i++) {
int alice = a.get(i);
int bob = b.get(i);
if(alice>bob){++ascore;}
else if(bob>alice){++bscore;}
}
ans.add(ascore);
ans.add(bscore);
return ans;
}
public static void main(String[] args) throws IOException {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
List<Integer> a = Stream.of(bufferedReader.readLine().replaceAll("\\s+$", "").split(" "))
.map(Integer::parseInt)
.collect(toList());
List<Integer> b = Stream.of(bufferedReader.readLine().replaceAll("\\s+$", "").split(" "))
.map(Integer::parseInt)
.collect(toList());
List<Integer> result = compareTriplets(a, b);
System.out.println(
result.stream()
.map(Object::toString)
.collect(joining(" "))
+ "\n"
);
bufferedReader.close();
}
}