#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable : 4786)
using namespace std;
int MIN(int a, int b) { return a < b ? a : b; }
int MAX(int a, int b) { return a > b ? a : b; }
int GCD(int a, int b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int LCM(int a, int b) { return a * (b / GCD(a, b)); }
void SWAP(int &a, int &b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
const double PI = acos(-1);
const double EPS = 1e-8;
struct stru {
  string s;
  int val, flag;
  bool operator()(const stru &a, const stru &b) { return a.s < b.s; }
} arr[100000], cmp;
int main() {
  int ind, i, j, N, T, result, cnt, counter, temp, temp1, idx, index, a, b, c,
      d, e;
  double aa, bb, cc;
  while (scanf("%d", &a) != EOF) {
    for (i = 0; i < 100000; i++) {
      arr[i].s = "";
      arr[i].val = NULL;
      arr[i].flag = NULL;
    }
    scanf("%d %lf", &b, &aa);
    string ss;
    for (i = 0; i < a; i++) {
      cin >> arr[i].s;
      scanf("%d", &arr[i].val);
      arr[i].flag = 0;
    }
    cnt = a;
    for (i = 0; i < b; i++) {
      cin >> ss;
      a = 0;
      for (j = 0; j < cnt; j++) {
        if (ss.compare(arr[j].s) == 0) {
          bb = aa * arr[j].val + EPS;
          cc = 100.00;
          if (bb < cc) {
            arr[j].val = 0;
          } else {
            arr[j].val = bb;
            arr[j].flag = 1;
            a = 1;
          }
        }
      }
      if (a == 0) {
        arr[cnt].s = ss;
        arr[cnt].val = 0;
        arr[cnt].flag = 1;
        cnt += 1;
      }
    }
    sort(arr, arr + cnt, cmp);
    c = 0;
    for (i = 0; i < cnt; i++) {
      if (arr[i].flag == 0) {
        bb = aa * arr[i].val + EPS;
        cc = 100.00;
        if (bb < cc) {
          arr[i].val = 0;
        } else {
          arr[i].val = bb;
          arr[i].flag = 1;
        }
      }
    }
    for (i = 0; i < cnt; i++) {
      if (arr[i].flag == 1) {
        c += 1;
      }
    }
    printf("%d\n", c);
    for (i = 0; i < cnt; i++) {
      if (arr[i].flag == 1) {
        cout << arr[i].s;
        printf(" %d\n", arr[i].val);
      }
    }
  }
  return 0;
}
