import sequtils, strutils proc isK(xs: seq[int]): bool = result = true if xs.len < 3: return false let l = xs[0]; let r = xs[2] if l == r: return false if l == xs.max and r == xs.min: return false if l == xs.min and r == xs.max: return false let a, b = stdin.readLine.split.map parseInt for i in 0..2: for j in 0..2: var x = a y = b swap(x[i], y[j]) if isK(x) and isK(y): echo "Yes" quit() echo "No"