Giving a list of IP segments, you are to determine whether a specified IP is in at least one of these segments.

Input

There's only one test case in this problem. The first portion of input is IP segment definitions. Each IP segment is like '' where startIP and endIP are valid IP strings, SP is a single space. IP segment definition will end with a '#' in a single line. There will be 1,000,000 IP segments at most.

After IP segment definitions, there will be some IPs, each in one line. End-of-file follows the last IP.

Output

For each IP, output 'yes' if it is in at least one of the given IP segments, 'no' otherwise.

Sample Input
202.115.32.39 202.115.32.40
202.115.40.41 202.115.41.40
#
192.168.1.1
202.115.40.41
202.115.40.40
Sample Output
no
yes
no