#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, counter = 0;
  double k;
  cin >> n >> m >> k;
  set<pair<string, long long int>> s;
  for (long long int i = 0; i < n; i++) {
    string x;
    long long int y;
    cin >> x >> y;
    if (y * k >= 100) {
      s.insert(make_pair(x, y));
      counter++;
    }
  }
  for (long long int i = 0; i < m; i++) {
    bool ok = true;
    string x;
    long long int y = 0;
    cin >> x;
    for (auto const &z : s) {
      if (x == z.first) {
        if (z.second * k >= 100) ok = false;
      }
    }
    if (ok) {
      s.insert(make_pair(x, y));
      counter++;
    }
  }
  cout << counter << endl;
  for (auto const &x : s) {
    long long int temp = x.second * k * 1.000000001;
    if (temp >= 100 || temp == 0) {
      cout << x.first << " " << temp << endl;
    }
  }
  return 0;
}
