#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N, M;
  string K;
  while (cin >> N >> M >> K) {
    K = K.substr(2);
    stringstream ss(K);
    int k;
    ss >> k;
    map<string, int> inp;
    for (int i = 0; i < (int)(N); i++) {
      string name;
      int level;
      cin >> name >> level;
      level = (level * k) / 100;
      if (level >= 100) {
        inp.insert(make_pair(name, level));
      }
    }
    for (int i = 0; i < (int)(M); i++) {
      string name;
      cin >> name;
      if (inp.count(name) == 0) inp[name] = 0;
    }
    cout << inp.size() << endl;
    for (map<string, int>::iterator it = inp.begin(); it != inp.end(); it++) {
      cout << it->first << " " << it->second << endl;
    }
  }
}
int main() {
  solve();
  return 0;
}
