Skip to main content
2 of 3
deleted 2 characters in body

#Scala, 43 bytes

def f(a:Int,b:Int)=a+b==5|(a-b).abs==5|a==b

Try it online!