#include <bits/stdc++.h>
using namespace std;
const int maxn = 16;
vector<pair<pair<int, long long>, int> > ans[1 << maxn];
vector<int> a[maxn];
map<long long, int> color;
long long sum[maxn];
int k;
int dp[1 << maxn];
void solve() {
  cin >> k;
  long long all_sum = 0;
  for (int i = 0; i < k; i++) {
    int n;
    cin >> n;
    for (int j = 0; j < n; j++) {
      long long x;
      cin >> x;
      a[i].push_back(x);
      all_sum += x;
      sum[i] += x;
      color[a[i][j]] = i;
    }
  }
  if (all_sum % k != 0) {
    cout << "No" << endl;
    return;
  }
  all_sum /= k;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < a[i].size(); j++) {
      long long cur = a[i][j];
      int used = 0;
      bool isok = true;
      vector<pair<pair<int, long long>, int> > an;
      do {
        int c1 = 0;
        auto it = color.find(cur);
        if (it != color.end())
          c1 = it->second;
        else {
          isok = false;
          break;
        }
        if (used & (1 << c1)) {
          isok = false;
          break;
        }
        used |= (1 << c1);
        cur = cur + (all_sum - sum[c1]);
        auto c2 = color.find(cur);
        if (c2 != color.end()) {
          an.push_back({{c2->second, cur}, c1});
        }
      } while (cur != a[i][j]);
      if (isok) {
        dp[used] = 1;
        ans[used] = std::move(an);
      }
    }
  }
  for (int i = 0; i < (1 << k); i++) {
    if (dp[i]) continue;
    for (int j = i; j > 0; j = (j - 1) & i) {
      if (dp[j] && dp[i & (~j)]) {
        dp[i] = 1;
        ans[i] = ans[j];
        for (auto &x : ans[i & (~j)]) ans[i].push_back(x);
        break;
      }
    }
  }
  int x = (1 << k) - 1;
  if (dp[x]) {
    cout << "Yes" << endl;
    sort(ans[x].begin(), ans[x].end());
    for (auto a : ans[x]) {
      cout << a.first.second << " " << a.second + 1 << endl;
    }
  } else
    cout << "No" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
