#include <bits/stdc++.h>
using namespace std;
map<string, int> mm;
string NowNames, TNames[25 * 2];
double k, newexp;
int n, m, i, pexp, ans;
int main() {
  scanf("%d%d%lf", &n, &m, &k);
  ans = -1;
  for (i = 1; i <= n; i++) {
    cin >> NowNames >> newexp;
    pexp = floor(newexp * 1.0 * k + 0.001);
    if (pexp >= 100) {
      mm[NowNames] = pexp;
      ans++;
      TNames[ans] = NowNames;
    }
  }
  for (i = 1; i <= m; i++) {
    cin >> NowNames;
    if (mm.find(NowNames) == mm.end()) {
      mm[NowNames] = 0;
      ans++;
      TNames[ans] = NowNames;
    }
  }
  sort(TNames, TNames + ans + 1);
  printf("%d\n", ans + 1);
  for (i = 0; i < ans + 1; i++) {
    cout << TNames[i] << " " << mm[TNames[i]] << endl;
  }
}
