#include <bits/stdc++.h>
using namespace std;
const int MAXN = 75002;
const int MAXB = 15;
map<long long, int> id;
long long val[MAXN];
int numBox, bnum[MAXN], match[MAXN];
vector<pair<int, int> > cycle[MAXB];
int cache[1 << MAXB];
int dp(int bm) {
  if (bm + 1 == (1 << numBox)) return 1;
  int& ret = cache[bm];
  if (ret != -1) return ret;
  ret = 0;
  int i = __builtin_ctz(~bm);
  for (auto it : cycle[i])
    if (!(bm & it.first) && dp(bm | it.first)) ret = 1;
  return ret;
}
void trace(int bm, vector<int>& v) {
  if (bm + 1 == (1 << numBox)) return;
  int i = __builtin_ctz(~bm);
  for (auto it : cycle[i])
    if (!(bm & it.first) && dp(bm | it.first)) {
      v.push_back(it.second);
      trace(bm | it.first, v);
      return;
    }
}
int main() {
  cin >> numBox;
  int p = 0;
  long long s[MAXB] = {0}, want = 0;
  for (int i = 0; i < numBox; ++i) {
    int n;
    cin >> n;
    while (n--) {
      long long x;
      scanf("%lld", &x);
      s[i] += x;
      want += x;
      id[x] = p++;
      val[id[x]] = x;
      bnum[id[x]] = i;
    }
  }
  if (want % numBox != 0) return !printf("No");
  want /= numBox;
  memset(match, -1, sizeof(match));
  for (int i = 0; i < p; ++i) {
    long long need = want - s[bnum[i]] + val[i];
    if (id.count(need)) match[i] = id[need];
  }
  for (int i = 0; i < p; ++i) {
    int cur = i, bm = (1 << bnum[cur]);
    while (match[cur] != -1) {
      int next = match[cur];
      if (bm & (1 << bnum[next])) {
        if (next == i) cycle[bnum[i]].push_back({bm, i});
        break;
      }
      bm |= (1 << bnum[next]);
      cur = next;
    }
  }
  memset(cache, -1, sizeof(cache));
  if (!dp(0)) return !printf("No");
  printf("Yes\n");
  vector<int> v;
  trace(0, v);
  vector<pair<int, int> > ans(numBox);
  for (int it : v) {
    int cur = it;
    while (true) {
      int next = match[cur];
      ans[bnum[next]] = {val[next], bnum[cur]};
      cur = next;
      if (cur == it) break;
    }
  }
  for (auto it : ans) printf("%d %d\n", it.first, it.second + 1);
}
