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;
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
int m, a[8], b[8];
const int max_size = 1e5 + 5;
int w[max_size][8], g[max_size];
int N, M;
bool flag_even;
void init() {
  for (int i = m + 1; i <= 6; ++i) a[i] = b[i] = 1;
  for (int i = 1; i <= a[6]; ++i)
    for (int j = 1; j <= a[5]; ++j)
      for (int k = 1; k <= a[4]; ++k)
        for (int p = 1; p <= a[3]; ++p)
          for (int q = 1; q <= a[2]; ++q) {
            int y = (i - 1) * a[5] * a[4] * a[3] * a[2] +
                    (j - 1) * a[4] * a[3] * a[2] + (k - 1) * a[3] * a[2] +
                    (p - 1) * a[2] + q;
            for (int x = 1; x <= a[1]; ++x) {
              w[(y - 1) * a[1] + (x - 1)][1 - 1] = x;
              w[(y - 1) * a[1] + (x - 1)][2 - 1] =
                  ((i - 1) * a[5] * a[4] * a[3] + (j - 1) * a[4] * a[3] +
                   (k - 1) * a[3] + p) &
                          1
                      ? q
                      : a[2] - q + 1;
              w[(y - 1) * a[1] + (x - 1)][3 - 1] =
                  ((i - 1) * a[5] * a[4] + (j - 1) * a[4] + k) & 1
                      ? p
                      : a[3] - p + 1;
              w[(y - 1) * a[1] + (x - 1)][4 - 1] =
                  ((i - 1) * a[5] + j) & 1 ? k : a[4] - k + 1;
              w[(y - 1) * a[1] + (x - 1)][5 - 1] = i & 1 ? j : a[5] - j + 1;
              w[(y - 1) * a[1] + (x - 1)][6 - 1] = i;
            }
          }
  N = a[1], M = a[2] * a[3] * a[4] * a[5] * a[6];
}
inline void walk(int x, int y, int tx, int ty) {
  for (int i = 1; i <= m; ++i) {
    if (w[(y - 1) * a[1] + (x - 1)][i - 1] !=
        w[(ty - 1) * a[1] + (tx - 1)][i - 1]) {
      if (w[(y - 1) * a[1] + (x - 1)][i - 1] <
          w[(ty - 1) * a[1] + (tx - 1)][i - 1])
        printf("inc %d\n", i);
      else
        printf("dec %d\n", i);
      return;
    }
  }
}
inline void work_LU_H(int lx, int rx, int ly, int ry) {
  for (int i = lx; i <= rx; i += 2) {
    for (int j = ly; j < ry; ++j) g[(j - 1) * a[1] + (i - 1)] = 0;
    g[(ry - 1) * a[1] + (i - 1)] = 2;
  }
  for (int i = lx + 1; i <= rx; i += 2) {
    for (int j = ry; j > ly; --j) g[(j - 1) * a[1] + (i - 1)] = 1;
    g[(ly - 1) * a[1] + (i - 1)] = 2;
  }
}
inline void work_LU_V(int lx, int rx, int ly, int ry) {
  for (int j = ly; j <= ry; j += 2) {
    for (int i = lx; i < rx; ++i) g[(j - 1) * a[1] + (i - 1)] = 2;
    g[(j - 1) * a[1] + (rx - 1)] = 0;
  }
  for (int j = ly + 1; j <= ry; j += 2) {
    for (int i = rx; i > lx; --i) g[(j - 1) * a[1] + (i - 1)] = 3;
    g[(j - 1) * a[1] + (lx - 1)] = 0;
  }
}
inline void work_RU_H(int lx, int rx, int ly, int ry) {
  for (int i = lx; i <= rx; i += 2) {
    for (int j = ry; j > ly; --j) g[(j - 1) * a[1] + (i - 1)] = 1;
    g[(ly - 1) * a[1] + (i - 1)] = 2;
  }
  for (int i = lx + 1; i <= rx; i += 2) {
    for (int j = ly; j < ry; ++j) g[(j - 1) * a[1] + (i - 1)] = 0;
    g[(ry - 1) * a[1] + (i - 1)] = 2;
  }
}
inline void work_RU_V(int lx, int rx, int ly, int ry) {
  for (int j = ry; j >= ly; j -= 2) {
    for (int i = lx; i < rx; ++i) g[(j - 1) * a[1] + (i - 1)] = 2;
    g[(j - 1) * a[1] + (rx - 1)] = 1;
  }
  for (int j = ry - 1; j >= ly; j -= 2) {
    for (int i = rx; i > lx; --i) g[(j - 1) * a[1] + (i - 1)] = 3;
    g[(j - 1) * a[1] + (lx - 1)] = 1;
  }
}
inline void work_LD_H(int lx, int rx, int ly, int ry) {
  for (int i = rx; i >= lx; i -= 2) {
    for (int j = ly; j < ry; ++j) g[(j - 1) * a[1] + (i - 1)] = 0;
    g[(ry - 1) * a[1] + (i - 1)] = 3;
  }
  for (int i = rx - 1; i >= lx; i -= 2) {
    for (int j = ry; j > ly; --j) g[(j - 1) * a[1] + (i - 1)] = 1;
    g[(ly - 1) * a[1] + (i - 1)] = 3;
  }
}
inline void work_LD_V(int lx, int rx, int ly, int ry) {
  for (int j = ly; j <= ry; j += 2) {
    for (int i = rx; i > lx; --i) g[(j - 1) * a[1] + (i - 1)] = 3;
    g[(j - 1) * a[1] + (lx - 1)] = 0;
  }
  for (int j = ly + 1; j <= ry; j += 2) {
    for (int i = lx; i < rx; ++i) g[(j - 1) * a[1] + (i - 1)] = 2;
    g[(j - 1) * a[1] + (rx - 1)] = 0;
  }
}
inline void work_RD_H(int lx, int rx, int ly, int ry) {
  for (int i = rx; i >= lx; i -= 2) {
    for (int j = ry; j > ly; --j) g[(j - 1) * a[1] + (i - 1)] = 1;
    g[(ly - 1) * a[1] + (i - 1)] = 3;
  }
  for (int i = rx - 1; i >= lx; i -= 2) {
    for (int j = ly; j < ry; ++j) g[(j - 1) * a[1] + (i - 1)] = 0;
    g[(ry - 1) * a[1] + (i - 1)] = 3;
  }
}
inline void work_RD_V(int lx, int rx, int ly, int ry) {
  for (int j = ry; j >= ly; j -= 2) {
    for (int i = rx; i > lx; --i) g[(j - 1) * a[1] + (i - 1)] = 3;
    g[(j - 1) * a[1] + (lx - 1)] = 1;
  }
  for (int j = ry - 1; j >= ly; j -= 2) {
    for (int i = lx; i < rx; ++i) g[(j - 1) * a[1] + (i - 1)] = 2;
    g[(j - 1) * a[1] + (rx - 1)] = 1;
  }
}
void work() {
  if (m == 1) {
    if (a[1] == 2) {
      puts("Cycle");
      if (b[1] == 1) {
        puts("inc 1");
        puts("dec 1");
      } else {
        puts("dec 1");
        puts("inc 1");
      }
    } else if (b[1] == 1) {
      puts("Path");
      for (int i = 1; i <= a[1] - 1; ++i) puts("inc 1");
    } else if (b[1] == a[1]) {
      puts("Path");
      for (int i = 1; i <= a[1] - 1; ++i) puts("dec 1");
    } else
      puts("No");
    return;
  }
  init();
  int x = b[1], y = -1;
  for (int i = 1; i <= M; ++i) {
    if (w[(i - 1) * a[1] + (x - 1)][2 - 1] == b[2] &&
        w[(i - 1) * a[1] + (x - 1)][3 - 1] == b[3] &&
        w[(i - 1) * a[1] + (x - 1)][4 - 1] == b[4] &&
        w[(i - 1) * a[1] + (x - 1)][5 - 1] == b[5] &&
        w[(i - 1) * a[1] + (x - 1)][6 - 1] == b[6]) {
      y = i;
      break;
    }
  }
  if (flag_even) {
    puts("Cycle");
    if (M & 1) {
      g[(1 - 1) * a[1] + (1 - 1)] = 0;
      work_LU_H(1, N, 2, M);
      g[(2 - 1) * a[1] + (N - 1)] = 1;
      for (int i = N; i >= 2; --i) g[(1 - 1) * a[1] + (i - 1)] = 3;
    } else {
      g[(1 - 1) * a[1] + (1 - 1)] = 2;
      work_LU_V(2, N, 1, M);
      g[(M - 1) * a[1] + (2 - 1)] = 3;
      for (int i = M; i >= 2; --i) g[(i - 1) * a[1] + (1 - 1)] = 1;
    }
    for (int i = 1; i <= N * M; ++i) {
      int tx = x + dx[g[(y - 1) * a[1] + (x - 1)]],
          ty = y + dy[g[(y - 1) * a[1] + (x - 1)]];
      walk(x, y, tx, ty);
      x = tx, y = ty;
    }
  } else {
    if ((x ^ y) & 1) {
      puts("No");
      return;
    }
    puts("Path");
    if (x == 1) {
      work_RU_H(1, N - 1, 1, y);
      g[(y - 1) * a[1] + (N - 1 - 1)] = 0;
      work_LD_V(1, N - 1, y + 1, M);
      g[(M - 1) * a[1] + (N - 1 - 1)] = 2;
      for (int i = M; i >= 2; --i) g[(i - 1) * a[1] + (N - 1)] = 1;
    } else if (x == N) {
      work_RD_H(2, N, 1, y);
      g[(y - 1) * a[1] + (2 - 1)] = 0;
      work_LU_V(2, N, y + 1, M);
      g[(M - 1) * a[1] + (2 - 1)] = 3;
      for (int i = M; i >= 2; --i) g[(i - 1) * a[1] + (1 - 1)] = 1;
    } else if (y == 1) {
      work_LD_V(1, x, 1, M - 1);
      g[(M - 1 - 1) * a[1] + (x - 1)] = 2;
      work_RU_H(x + 1, N, 1, M - 1);
      g[(M - 1 - 1) * a[1] + (N - 1)] = 0;
      for (int i = N; i >= 2; --i) g[(M - 1) * a[1] + (i - 1)] = 3;
    } else if (y == M) {
      work_RD_V(1, x, 2, M);
      g[(2 - 1) * a[1] + (x - 1)] = 2;
      work_LU_H(x + 1, N, 2, M);
      g[(2 - 1) * a[1] + (N - 1)] = 1;
      for (int i = N; i >= 2; --i) g[(1 - 1) * a[1] + (i - 1)] = 3;
    } else if (x & 1) {
      for (int i = x; i >= 2; --i) g[(y - 1) * a[1] + (i - 1)] = 3;
      g[(y - 1) * a[1] + (1 - 1)] = 1;
      work_RU_H(1, x, 1, y - 1);
      g[(1 - 1) * a[1] + (x - 1)] = 2;
      work_LU_V(x + 1, N, 1, y);
      g[(y - 1) * a[1] + (N - 1)] = 0;
      work_LD_V(1, N, y + 1, M);
    } else {
      work_RD_V(1, x, 1, y);
      g[(1 - 1) * a[1] + (x - 1)] = 2;
      work_LU_H(x + 1, N, 1, y);
      g[(y - 1) * a[1] + (N - 1)] = 0;
      work_LD_V(1, N, y + 1, M);
    }
    for (int i = 1; i <= N * M - 1; ++i) {
      int tx = x + dx[g[(y - 1) * a[1] + (x - 1)]],
          ty = y + dy[g[(y - 1) * a[1] + (x - 1)]];
      walk(x, y, tx, ty);
      x = tx, y = ty;
    }
  }
}
int main() {
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d", a + i);
    flag_even |= !(a[i] & 1);
  }
  for (int i = 1; i <= m; ++i) scanf("%d", b + i);
  work();
  return 0;
}