#include <bits/stdc++.h>
struct M {
  int p, b;
};
struct F {
  int l, r, i;
  int p, c = 0;
  int t() { return r - p; }
};
struct Fp {
  F *p;
  bool operator<(const Fp &rhs) const { return p->l < rhs.p->l; }
};
void update(const Fp &f, std::map<int, Fp>::iterator &f_it,
            std::map<int, Fp> &fs, const M &m) {
  f.p->c++;
  f.p->r += m.b;
  while (f_it != fs.end()) {
    Fp f_succ = f_it->second;
    if (f.p->r < f_succ.p->r) {
      if (f.p->r >= f_succ.p->l) {
        f_succ.p->l = f.p->r + 1;
        f_it = fs.erase(f_it);
        f_it = fs.insert(f_it, {f_succ.p->l, f_succ});
      }
      break;
    }
    f_it = fs.erase(f_it);
  }
};
void solve(std::vector<F> &fs_v, std::vector<M> &ms_v) {
  std::map<int, Fp> fs;
  {
    std::vector<Fp> fs_sort;
    fs_sort.reserve(fs_v.size());
    for (int i = 0; i < fs_v.size(); i++) {
      fs_sort.push_back({&(fs_v[i])});
    }
    std::sort(fs_sort.begin(), fs_sort.end());
    fs.insert({fs_sort[0].p->l, fs_sort[0]});
    int curr = fs_sort[0].p->r;
    for (int i = 1; i < fs_sort.size(); i++) {
      Fp &f = fs_sort[i];
      if (f.p->r > curr) {
        f.p->l = std::max(curr + 1, f.p->l);
        curr = f.p->r;
        fs.insert({f.p->l, f});
      }
    }
  }
  std::multimap<int, int> ms;
  for (int i = 0; i < ms_v.size(); i++) {
    M &m = ms_v[i];
    auto f_it = --fs.upper_bound(m.p);
    if (f_it == fs.end()) continue;
    const Fp &f = f_it->second;
    if (f.p->l <= m.p && m.p <= f.p->r) {
      update(f, ++f_it, fs, m);
      auto m_succ = ms.lower_bound(f.p->l);
      while (m_succ != ms.end()) {
        M m{m_succ->first, m_succ->second};
        if (f.p->l <= m.p && m.p <= f.p->r) {
          update(f, f_it, fs, m);
          m_succ = ms.erase(m_succ);
        } else {
          break;
        }
      }
    } else {
      ms.insert({m.p, m.b});
    }
  }
  for (F &f : fs_v) {
    printf("%d %d\n", f.c, f.t());
  }
}
int main() {
  int n;
  int m;
  scanf("%d%d", &n, &m);
  std::vector<F> fs(n);
  std::vector<M> ms(m);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &(fs[i].l), &(fs[i].r));
    fs[i].r += fs[i].l;
    fs[i].i = i;
    fs[i].p = fs[i].l;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &(ms[i].p), &(ms[i].b));
  }
  solve(fs, ms);
  return 0;
}
