h =
	6.times.map { gets.split.map(&:to_i).minmax }.each_with_object(
		Hash.new(0)
	) { |i, o| o[i] += 1 }

if h.values.any?(&:odd?)
	puts 'no'
	exit
end
xy = []
h.each { |s, c| xy.concat([s] * (c / 2)) }
case xy.flatten.uniq.size
when 1
	puts 'yes'
when 2
	puts xy.count { |v| v[0] == v[1] } == 1 ? 'yes' : 'no'
when 3
	puts xy.count { |v| v[0] == v[1] } == 0 && xy.uniq.size == 3 ? 'yes' : 'no'
else
	puts 'no'
end

