# -*- coding: utf-8 -*-
from sys import stdin

Dic = {}
n = int(stdin.readline().rstrip())
for i in range(n):
  line = stdin.readline().rstrip()
  if line[0] == 'i':
    Dic[line[7:]] = 0
  else:
    print('yes' if line[5:] in Dic else 'no') from sys import stdin Dic = {} Dic {} n = int(stdin.readline().rstrip()) n int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip for i in range(n):
  line = stdin.readline().rstrip()
  if line[0] == 'i':
    Dic[line[7:]] = 0
  else:
    print('yes' if line[5:] in Dic else 'no') i range(n) range n line = stdin.readline().rstrip() line stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip if line[0] == 'i':
    Dic[line[7:]] = 0
  else:
    print('yes' if line[5:] in Dic else 'no') line[0] == 'i' line[0] line 0 'i' Dic[line[7:]] = 0 Dic[line[7:]] Dic line[7:] line 7: 7 0 print('yes' if line[5:] in Dic else 'no') print 'yes' if line[5:] in Dic else 'no' line[5:] in Dic line[5:] line 5: 5 Dic 'yes' 'no' Dic = {} {} Dic line = stdin.readline().rstrip() stdin.readline().rstrip() line n = int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) n
# -*- coding: utf-8 -*-
from sys import stdin

Dic = {}
n = int(stdin.readline().rstrip())
for i in range(n):
  line = stdin.readline().rstrip()
  if line[0] == 'i':
    Dic[line[7:]] = 0
  else:
    print('yes' if line[5:] in Dic else 'no')
