arr = []
h = Hash.new(0)
6.times{
    y, x = gets.chomp.split.map(&:to_i).sort
    h[[y, x]] += 1
    arr << y << x
}
arr.sort!.uniq!
cuboid = false
case arr.length
when 1
    cuboid = true
when 2
    cuboid = true if h[[arr[0], arr[0]]] == 2 && h[[arr[0], arr[1]]] == 4
    cuboid = true if h[[arr[0], arr[1]]] == 4 && h[[arr[1], arr[1]]] == 2
when 3
    cuboid = true if [[arr[0], arr[1]], [arr[0], arr[2]], [arr[1], arr[2]]].all?{|y, x| h[[y, x]] == 2}
end
puts cuboid ? "yes" : "no"
