#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 100;
const int mod = (int)1e9 + 7;
int k, ans[20][2], vis[1 << 16];
long long sum;
struct node {
  int n;
  long long a[5050], sum;
} p[20];
map<int, int> mp;
int work(int x, int num, int sta) {
  int pos = x, out = num;
  ans[x][0] = out;
  sta |= (1 << x);
  while (1) {
    long long need = sum - (p[pos].sum - out);
    if (need == num) return ans[x][1] = pos, sta;
    if (!mp.count(need)) return 0;
    if (sta & (1 << (pos = mp[need]))) return 0;
    sta |= (1 << pos);
    ans[pos][0] = need;
    ans[pos][1] = mp[out];
    out = need;
  }
}
void dfs(int x, int sta) {
  if (x > k) {
    puts("Yes");
    for (int i = (1); i <= (k); ++i) printf("%d %d\n", ans[i][0], ans[i][1]);
    exit(0);
  }
  if (vis[sta]) return;
  if (sta & (1 << x)) return (void)dfs(x + 1, sta);
  for (int i = (1); i <= (p[x].n); ++i) {
    int tmp = work(x, p[x].a[i], sta);
    if (tmp) dfs(x + 1, tmp), vis[tmp] = 1;
  }
}
int main() {
  scanf("%d", &k);
  for (int i = (1); i <= (k); ++i) {
    scanf("%d", &p[i].n);
    for (int j = (1); j <= (p[i].n); ++j) {
      scanf("%lld", &p[i].a[j]);
      p[i].sum += p[i].a[j];
      mp[p[i].a[j]] = i;
    }
    sum += p[i].sum;
  }
  if (sum % k) return puts("No"), 0;
  sum /= k;
  dfs(1, 0);
  return puts("No"), 0;
}
