#include <bits/stdc++.h>
using namespace std;
map<string, int> mp;
map<string, int>::iterator iter;
int main() {
  int n, m;
  double k;
  string name;
  int val;
  while (cin >> n >> m >> k) {
    mp.clear();
    while (n--) {
      cin >> name >> val;
      val = val * k + 1e-6;
      if (val >= 100) {
        mp[name] = val;
      }
    }
    while (m--) {
      cin >> name;
      if (mp.find(name) == mp.end()) {
        mp[name] = 0;
      }
    }
    cout << mp.size() << endl;
    for (iter = mp.begin(); iter != mp.end(); iter++) {
      cout << iter->first << " " << iter->second << endl;
    }
  }
  return 0;
}
