Problem: Recently Ivan bought a new computer. Excited, he unpacked it and installed his favourite game. With his old computer Ivan had to choose the worst possible graphic settings (because otherwise the framerate would be really low), but now he wants to check, maybe his new computer can perform well even with the best possible graphics?

There are m graphics parameters in the game. i-th parameter can be set to any positive integer from 1 to ai, and initially is set to bi (bi ≤ ai). So there are <image> different combinations of parameters. Ivan can increase or decrease any of these parameters by 1; after that the game will be restarted with new parameters (and Ivan will have the opportunity to check chosen combination of parameters).

Ivan wants to try all p possible combinations. Also he wants to return to the initial settings after trying all combinations, because he thinks that initial settings can be somehow best suited for his hardware. But Ivan doesn't really want to make a lot of restarts.

So he wants you to tell the following:

  * If there exists a way to make exactly p changes (each change either decreases or increases some parameter by 1) to try all possible combinations and return to initial combination, then Ivan wants to know this way. 
  * Otherwise, if there exists a way to make exactly p - 1 changes to try all possible combinations (including the initial one), then Ivan wants to know this way. 



Help Ivan by showing him the way to change parameters!

Input

The first line of input contains one integer number m (1 ≤ m ≤ 6).

The second line contains m integer numbers a1, a2, ..., am (2 ≤ ai ≤ 1000). It is guaranteed that <image>.

The third line contains m integer numbers b1, b2, ..., bm (1 ≤ bi ≤ ai).

Output

If there is a way to make exactly p changes (each change either decreases or increases some parameter by 1) to try all possible combinations and return to initial combination, then output Cycle in the first line. Then p lines must follow, each desribing a change. The line must be either inc x (increase parameter x by 1) or dec x (decrease it).

Otherwise, if there is a way to make exactly p - 1 changes to try all possible combinations (including the initial one), then output Path in the first line. Then p - 1 lines must follow, each describing the change the same way as mentioned above.

Otherwise, output No.

Examples

Input

1
3
1


Output

Path
inc 1
inc 1


Input

1
3
2


Output

No


Input

2
3 2
1 1


Output

Cycle
inc 1
inc 1
inc 2
dec 1
dec 1
dec 2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n, ntot, rs[6], ord[6 + 1], iord[6 + 1];
vector<int> xs;
void run_even(vector<short> &res) {
  int pp = xs[0], qq = xs[1];
  for (int i = 0; i < pp; i += 2) {
    res.push_back((1 << 5) | 0);
    res.push_back(((qq - 2) << 5) | 1);
    res.push_back((1 << 5) | 0);
    res.push_back(((qq - 2) << 5) | 9);
  }
  res[0] |= 1;
  res[res.size() - 1] += (1 << 5);
  res.push_back(((pp - 2) << 5) | 8);
  res.push_back((1 << 5) | 8);
  for (int k = 2; k < n; k++) {
    int bl = res.size();
    for (int i = bl - 2; i > 0; i--) res.push_back(res[i] ^ 8);
    for (int j = 2, l = 0; j < xs[k]; j++, l ^= 1) {
      if (l == 0)
        res.insert(res.end(), res.begin(), res.begin() + bl - 1);
      else
        res.insert(res.end(), res.begin() + bl - 1, res.begin() + 2 * (bl - 1));
      res[res.size() - (bl - 1)] = (1 << 5) | k;
    }
    res.push_back(xs[k] % 2 == 0 ? (res[0] ^ 8) : res[bl - 1]);
    res[bl - 1] = (1 << 5) | k;
    res.push_back(((xs[k] - 2) << 5) | 8 | k);
    res.push_back((1 << 5) | 8 | k);
  }
}
void run_odd(vector<short> &res) {
  int p = rs[0], q = rs[1], pp = xs[0], qq = xs[1];
  int l = 0, dr, dl, du, dd;
  if (p % 2 == 0 && q % 2 == 0)
    l |= 1, dr = pp - p - 1, dl = p - 2, du = qq - q - 1, dd = q - 2;
  else if (p != 1 && q != 1)
    dr = pp - p, dl = p - 3, du = qq - q, dd = q - 3;
  else if (p != 1 && q == 1)
    dr = pp - p, dl = p - 3, du = 0, dd = qq - 3, l |= 4;
  else if (p == 1 && q != 1)
    dr = 0, dl = pp - 3, du = qq - q, dd = q - 3, l |= 2;
  else
    dr = 0, dl = pp - 3, du = 0, dd = qq - 3, l |= 2, l |= 4;
  auto dou = [&]() {
    for (int i = 0; i < du; i += 2)
      for (auto k :
           {l & 4 ? 9 : 1, l & 2 ? 8 : 0, l & 4 ? 9 : 1, l & 2 ? 0 : 8})
        res.push_back(((k & 1 ? 1 : pp - 2) << 5) | k);
    res.push_back((1 << 5) | (l & 2 ? 0 : 8));
    res.push_back((du << 5) | (l & 4 ? 1 : 9));
  };
  if (l & 1) {
    for (auto k : {8, 1}) res.push_back((1 << 5) | k);
    if (dl == 0 && du != 0) {
      auto pd = res.end();
      dou();
      for_each(pd, res.end(), [](short &r) { r ^= 8; });
      reverse(pd, res.end());
      res.push_back((1 << 5) | 0);
    } else
      res.push_back((2 << 5) | 0);
  }
  if (dr != 0) {
    res.push_back((1 << 5) | (l & 2 ? 8 : 0));
    res.push_back(((dr - 1) << 5) | (l & 2 ? 8 : 0));
    res.push_back((1 << 5) | (l & 4 ? 1 : 9));
    for (int i = 0; i < dr; i += 2)
      for (auto k :
           {l & 4 ? 1 : 9, l & 2 ? 0 : 8, l & 4 ? 9 : 1, l & 2 ? 0 : 8})
        res.push_back((1 << 5) | k);
  } else
    res.push_back((1 << 5) | (l & 4 ? 1 : 9));
  if (!(l & 1)) {
    for (auto k : {l & 4 ? 1 : 9, l & 2 ? 0 : 8, l & 4 ? 9 : 1})
      res.push_back((1 << 5) | k);
    res[res.size() - 1] += 1 << 5;
    if (dl == 0 && du != 0)
      dou();
    else
      res.push_back((1 << 5) | (l & 2 ? 0 : 8));
    res.push_back((2 << 5) | (l & 4 ? 1 : 9));
  } else {
    res.push_back((1 << 5) | 9);
    res.push_back((2 << 5) | 8);
  }
  if (dl != 0) {
    for (int i = 0; i < (du ? dl - 2 : dl); i += 2)
      for (auto k :
           {l & 2 ? 0 : 8, l & 4 ? 9 : 1, l & 2 ? 0 : 8, l & 4 ? 1 : 9})
        res.push_back(((k & 1 ? 2 : 1) << 5) | k);
    if (du != 0) {
      res.push_back((1 << 5) | (l & 2 ? 0 : 8));
      res.push_back((2 << 5) | (l & 4 ? 9 : 1));
      dou();
      res.push_back((2 << 5) | (l & 4 ? 1 : 9));
    }
  }
  if (dd != 0) {
    for (int i = 0, kk = l & 2 ? 8 : 0, kl = l & 4 ? 1 : 9; i < dd;
         i++, kk ^= 8) {
      res.push_back((1 << 5) | kl);
      res.push_back(((pp - 1) << 5) | kk);
    }
  }
  if ((res[res.size() - 1] >> 5) > 1) {
    res[res.size() - 1] -= (1 << 5);
    res.push_back((1 << 5) | (res[res.size() - 1] & ((1 << 5) - 1)));
  }
  for (int k = 2; k < n; k++) {
    int bl = res.size();
    auto rres = res;
    for_each(rres.begin(), rres.end(), [](short &r) { r ^= 8; });
    reverse(rres.begin(), rres.end());
    for (int j = 1; j < rs[k]; j += 2) {
      for (int i = bl - 2; i >= 0; i--) res.push_back(res[i] ^ 8);
      res.push_back((1 << 5) | 8 | k);
      res.insert(res.end(), res.begin(), res.begin() + bl);
    }
    for (int j = 1; j < rs[k]; j += 2) res.push_back((2 << 5) | k);
    for (int j = rs[k]; j < xs[k]; j += 2) {
      res.push_back((1 << 5) | k);
      res.insert(res.end(), rres.begin(), rres.end());
      res.push_back((1 << 5) | k);
      res.insert(res.end(), res.begin(), res.begin() + bl);
    }
    for (int j = 1; j < rs[k]; j += 2) res[j * bl - 1] = (1 << 5) | 8 | k;
    if (res[res.size() - 1] >> 5 != 1) {
      res[res.size() - 1] -= 1 << 5;
      res.push_back((1 << 5) | (res[res.size() - 1] & ((1 << 5) - 1)));
    }
  }
}
void iprint(vector<short> &vi, bool cycle) {
  long long rx = 0;
  for (int i = n; i >= 1; rx = (rx << 10) + rs[i - 1] - 1, i--)
    iord[ord[i]] = i;
  long long px = cycle ? 0 : rx, j;
  int kk = 0, i, jh, jl;
  stringstream ss1, ss2, *ss = &ss1;
  for (int k = 0; k < (int)vi.size(); k++)
    for (i = (vi[k] >> 5) - 1, jh = vi[k] & 8, jl = vi[k] & 7,
        j = (jh ? -1LL : 1LL) << (jl * 10);
         i >= 0; i--, kk++, px += j, px == rx ? (ss = &ss2) : 0)
      (*ss) << (jh ? "dec " : "inc ") << iord[jl + 1] << endl;
  cout << ss2.str() << ss1.str();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  ntot = 1;
  xs.resize(n);
  for (int i = 0; i < n; i++) cin >> xs[i], ntot *= xs[i];
  for (int i = 0; i < n; i++) cin >> rs[i];
  if (n == 1) {
    if (xs[0] == 2 && rs[0] == 1)
      cout << "Cycle" << endl << "inc 1" << endl << "dec 1" << endl;
    else if (xs[0] == 2 && rs[0] == 2)
      cout << "Cycle" << endl << "dec 1" << endl << "inc 1" << endl;
    else if (rs[0] == 1) {
      cout << "Path" << endl;
      for (int i = 1; i < xs[0]; i++) cout << "inc 1" << endl;
    } else if (rs[0] == xs[0]) {
      cout << "Path" << endl;
      for (int i = 1; i < xs[0]; i++) cout << "dec 1" << endl;
    } else
      cout << "No" << endl;
  } else {
    vector<short> ans;
    bool cycle = false;
    for (int i = 1; i <= n; i++) ord[i] = i;
    for (int i = 0; i < n; i++)
      if (xs[i] % 2 == 0) {
        swap(xs[0], xs[i]);
        swap(rs[0], rs[i]);
        swap(ord[1], ord[i + 1]);
        break;
      }
    if (xs[0] % 2 == 0) {
      cout << "Cycle" << endl;
      cycle = true;
      run_even(ans);
    } else {
      for (int i = 1; i < n; i++)
        if (rs[i] % 2 == 0) {
          if (rs[0] % 2 != 0) {
            swap(xs[0], xs[i]);
            swap(rs[0], rs[i]);
            swap(ord[1], ord[i + 1]);
          } else if (rs[1] % 2 != 0) {
            swap(xs[1], xs[i]);
            swap(rs[1], rs[i]);
            swap(ord[2], ord[i + 1]);
          } else
            break;
        }
      bool ok = true;
      for (int i = 2; i < n; i++)
        if (rs[i] % 2 == 0) ok = false;
      if ((rs[0] + rs[1]) % 2 == 1) ok = false;
      if (!ok)
        cout << "No" << endl;
      else {
        cout << "Path" << endl;
        run_odd(ans);
      }
    }
    iprint(ans, cycle);
  }
  return 0;
}