#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  vector<vector<int64_t>> box(k);
  for (auto& b : box) {
    int t;
    cin >> t;
    b.resize(t);
    for (int i = 0; i < t; i++) {
      cin >> b[i];
    }
  }
  map<int64_t, pair<int, int>> index;
  int64_t sum = 0;
  vector<int64_t> sums(k);
  for (int bi = 0; bi < k; bi++) {
    for (int ii = 0; ii < (int)box[bi].size(); ii++) {
      int item = box[bi][ii];
      assert(!index.count(item));
      index[item] = pair<int, int>(bi, ii);
      sum += item;
      sums[bi] += item;
    }
  }
  if (sum % k != 0) {
    cout << "No" << endl;
    return 0;
  }
  sum /= k;
  const int MAX = 1 << k;
  vector<int> is(MAX, 0);
  vector<vector<pair<int, int>>> cycles(MAX);
  for (auto it = index.cbegin(); it != index.cend(); ++it) {
    bool cycle_error = false;
    vector<pair<int, int>> cycle;
    int64_t mask = 0;
    pair<int, int> p = it->second;
    while (true) {
      cycle.push_back(p);
      mask |= 1 << p.first;
      int64_t newValue = sum - (sums[p.first] - box[p.first][p.second]);
      auto f_it = index.find(newValue);
      if (f_it == it) {
        break;
      }
      if (f_it == index.end() || (mask & (1 << f_it->second.first))) {
        cycle_error = true;
        break;
      }
      p = f_it->second;
    }
    if (!cycle_error) {
      cycles[mask] = cycle;
      is[mask] = 1;
    }
  }
  vector<int> dp(MAX);
  dp[0] = 1;
  for (int m = 0; m < MAX; m++) {
    for (int sub = m; sub > 0; sub = (sub - 1) & m) {
      if (is[sub] && dp[m & ~sub]) {
        dp[m] = sub;
        break;
      }
    }
  }
  if (dp[MAX - 1]) {
    cout << "Yes" << endl;
    vector<pair<int, int>> res(k);
    for (int m = MAX - 1; m > 0; m = m & ~dp[m]) {
      auto const& cycle = cycles[dp[m]];
      int len = (int)cycle.size();
      for (int i = 0; i < len; i++) {
        auto const& p = cycle[i];
        res[p.first] = pair<int, int>(box[p.first][p.second],
                                      cycle[(i + len - 1) % len].first + 1);
      }
    }
    for (auto p : res) {
      cout << p.first << " " << p.second << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
