#include <bits/stdc++.h>
using namespace std;
int n[15];
long long tot_sum = 0;
long long box_sum[15];
map<int, int> m;
map<int, vector<pair<int, int> > > cycles;
int main() {
  long long k;
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> n[i];
    for (int j = 0; j < n[i]; j++) {
      int a;
      scanf("%d", &a);
      box_sum[i] += a;
      m[a] = i;
    }
    tot_sum += box_sum[i];
  }
  if (tot_sum % k != 0) {
    printf("No\n");
    return 0;
  }
  long long tg = tot_sum / k;
  for (auto el : m) {
    int orig = el.first;
    int cycle = 0;
    int cur = orig;
    int curbox = el.second;
    vector<pair<int, int> > v;
    bool ok = true;
    do {
      if (cycle & (1 << curbox)) {
        ok = false;
        break;
      }
      cycle += 1 << curbox;
      long long nextcur = tg - (box_sum[curbox] - cur);
      if (abs(nextcur) > 1E9 || m.find(nextcur) == m.end()) {
        ok = false;
        break;
      }
      v.push_back({nextcur, curbox});
      curbox = m[nextcur];
      cur = nextcur;
    } while (ok && cur != orig);
    if (ok && cycles.find(cycle) == cycles.end()) {
      cycles[cycle] = v;
    }
  }
  map<int, vector<pair<int, int> > > allcycles = cycles;
  for (auto el : cycles) {
    vector<pair<int, vector<pair<int, int> > > > v;
    for (auto el2 : allcycles)
      if ((el.first & el2.first) == 0) {
        int newc = el.first | el2.first;
        if (allcycles.find(newc) == allcycles.end()) {
          vector<pair<int, int> > vp;
          for (auto x : el.second) vp.push_back(x);
          for (auto x : el2.second) vp.push_back(x);
          v.push_back({newc, vp});
        }
      }
    for (auto x : v) {
      allcycles[x.first] = x.second;
    }
  }
  if (allcycles.find((1 << k) - 1) != allcycles.end()) {
    printf("Yes\n");
    for (int i = 0; i < k; i++)
      for (auto x : allcycles[(1 << k) - 1])
        if (m[x.first] == i) printf("%d %d\n", x.first, x.second + 1);
  } else
    printf("No\n");
  return 0;
}
