si = require('fs').createReadStream('/dev/stdin');

rl = require('readline').createInterface({
  input: si, output: process.stdout});

dic = {};

rl.on('line', function (line) {
  var inst = line.split(' ');
  if (inst[0] === 'insert') dic[inst[1]] = null;
  else if (inst[0] === 'find')
    console.log(dic.hasOwnProperty(inst[1]) ? 'yes' : 'no');
});