#include <bits/stdc++.h>
using namespace std;
double eps = 1e-6;
struct node {
  int sc;
  char name[30];
  bool operator<(const node &b) const {
    if (strcmp(name, b.name) == 0) return sc > b.sc;
    return strcmp(name, b.name) <= 0;
  }
} nod[50], now;
int main() {
  int n, m, i;
  double k;
  scanf("%d%d%lf", &n, &m, &k);
  int len = 1;
  for (i = 0; i < n; i++) {
    scanf("%s%d", now.name, &now.sc);
    now.sc = (int)(k * now.sc + eps);
    if (now.sc < 100) continue;
    nod[len++] = now;
  }
  for (i = 0; i < m; i++) {
    scanf("%s", nod[len + i].name);
    nod[len + i].sc = 0;
  }
  nod[0].name[0] = 0;
  len += m;
  sort(nod + 1, nod + len + 1);
  int ans = 0;
  for (i = 1; i <= len; i++) {
    if (strcmp(nod[i].name, nod[i - 1].name)) ans++;
  }
  printf("%d\n", ans);
  for (i = 1; i <= len; i++) {
    if (strcmp(nod[i].name, nod[i - 1].name))
      printf("%s %d\n", nod[i].name, nod[i].sc);
  }
  return 0;
}
