#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
vector<pair<string, int> > res;
set<string> mark;
int n, m;
double k;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    string a;
    int b;
    cin >> a >> b;
    int c = (b * k + eps);
    if (c >= 100) {
      mark.insert(a);
      res.push_back(pair<string, int>(a, c));
    }
  }
  for (int i = 0; i < m; i++) {
    string a;
    cin >> a;
    if (mark.find(a) == mark.end()) {
      mark.insert(a);
      res.push_back(pair<string, int>(a, 0));
    }
  }
  sort(res.begin(), res.end());
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}
