#include <bits/stdc++.h>
int main() {
  int16_t n, m;
  std::string k;
  std::cin >> n >> m >> k;
  k = k.substr(2);
  int16_t kk = std::stoi(k);
  std::map<std::string, int16_t> skills;
  std::string tempN;
  int16_t tempS;
  for (int16_t i = 0; i < n; i++) {
    std::cin >> tempN >> tempS;
    int16_t value = (kk * tempS) / 100;
    if (value >= 100) skills[tempN] = value;
  }
  for (int16_t i = 0; i < m; i++) {
    std::cin >> tempN;
    if (skills.find(tempN) == skills.end()) skills[tempN] = 0;
  }
  std::cout << skills.size() << "\n";
  for (auto &s : skills) std::cout << s.first << " " << s.second << "\n";
  return 0;
}
