from functools import*;Z=0 @cache def f(a,b,c,x,y): global Z if x>y:x,y=y,x for i in(0,1,2): if(a,b,c)[i]: if(z:=2<