#!/bin/ruby n,a,b,q = gets.strip.split(' ') n = n.to_i a = a.to_i b = b.to_i q = q.to_i c = gets.strip c = c.split(' ').map(&:to_i) for a0 in (1..q-1) queryType,first,second = gets.strip.split(' ') queryType = queryType.to_i first = first.to_i second = second.to_i # your code goes here puts ['YES', 'NO'].sample end