#include <bits/stdc++.h>
using namespace std;
map<string, int> g;
int main() {
  int n, m, exp, tmp;
  double k;
  string name;
  cin >> n >> m >> k;
  k = (k * 100) + (1e-8);
  for (int i = 0; i < n; i++) {
    cin >> name >> exp;
    ;
    tmp = exp * k / 100;
    if (tmp < 100) continue;
    g[name] = tmp;
  }
  for (int i = 0; i < m; i++) {
    cin >> name;
    if (!g.count(name)) g[name] = 0;
  }
  cout << g.size() << "\n";
  for (map<string, int>::iterator i = g.begin(); i != g.end(); i++)
    cout << i->first.c_str() << " " << i->second << "\n";
}
