#include <bits/stdc++.h>
int main(int argc, const char *const argv[]) {
  int n, m, k;
  if (scanf("%d %d 0.%d", &n, &m, &k) != 3 || n < 1 || 20 < n || m < 1 ||
      20 < m || k < 1 || 99 < k) {
    fprintf(stderr, "scanf: Header IO error.\n");
    exit(EXIT_FAILURE);
  }
  std::map<std::string, int> skills;
  for (int64_t i = 0; i < n; i++) {
    char name[101];
    int x;
    if (scanf("%100s %d", name, &x) != 2) {
      fprintf(stderr, "scanf: Skills IO error.\n");
      exit(EXIT_FAILURE);
    }
    const int y = (k * x) / 100;
    if (y >= 100) skills[name] = y;
  }
  for (int64_t i = 0; i < m; i++) {
    char name[101];
    if (scanf("%100s", name) != 1) {
      fprintf(stderr, "scanf: Transmigration IO error.\n");
      exit(EXIT_FAILURE);
    }
    skills[name] += 0;
  }
  printf("%d\n", static_cast<int>(skills.size()));
  for (const std::pair<std::string, int> &s : skills)
    printf("%s %d\n", s.first.c_str(), s.second);
  return EXIT_SUCCESS;
}
