You are given a tree (a graph with n vertices and n - 1 edges in which it's possible to reach any vertex from any other vertex using only its edges).

A vertex can be destroyed if this vertex has even degree. If you destroy a vertex, all edges connected to it are also deleted.

Destroy all vertices in the given tree or determine that it is impossible.

Input

The first line contains integer n (1 ≤ n ≤ 2·105) — number of vertices in a tree.

The second line contains n integers p1, p2, ..., pn (0 ≤ pi ≤ n). If pi ≠ 0 there is an edge between vertices i and pi. It is guaranteed that the given graph is a tree.

Output

If it's possible to destroy all vertices, print "YES" (without quotes), otherwise print "NO" (without quotes).

If it's possible to destroy all vertices, in the next n lines print the indices of the vertices in order you destroy them. If there are multiple correct answers, print any.

Examples

Input

5
0 1 2 1 2


Output

YES
1
2
3
5
4


Input

4
0 1 2 3


Output

NO

Note

In the first example at first you have to remove the vertex with index 1 (after that, the edges (1, 2) and (1, 4) are removed), then the vertex with index 2 (and edges (2, 3) and (2, 5) are removed). After that there are no edges in the tree, so you can remove remaining vertices in any order.

<image>
#include <bits/stdc++.h>
using namespace std;
void read_file(bool outToFile = 1) {
  freopen("in", "r", stdin);
  if (outToFile) freopen("out", "w", stdout);
}
vector<int> v[300005];
bool dp[300005][2];
int ed[300005];
int ze[300005];
int bo[300005];
int on[300005];
int P[300005];
void dfs(int node, int p = -1) {
  P[node] = p;
  bool isleaf = true;
  int zero = 0, one = 0, both = 0;
  for (int i = 0; i < v[node].size(); i++) {
    int cur = v[node][i];
    if (cur == p) continue;
    isleaf = false;
    dfs(cur, node);
    if (dp[cur][0] == dp[cur][1]) {
      if (dp[node][0] == 0) {
        dp[node][0] = dp[node][1] = 0;
        return;
      } else
        both++;
    } else if (dp[cur][0] == 1)
      zero++;
    else
      one++;
  }
  if (isleaf) {
    dp[node][1] = 0;
    dp[node][0] = 1;
  } else {
    dp[node][0] = dp[node][1] = 0;
    int edges = zero + one + both;
    ed[node] = edges;
    ze[node] = zero;
    on[node] = one;
    bo[node] = both;
    for (int i = 0; i <= 1; i++) {
      if ((i + edges) % 2 == 0) {
        dp[node][i] = (one % 2 == 0 || (one % 2 == 1 && both > 0));
      } else
        dp[node][i] = (one % 2 == 1 || (one % 2 == 0 && both > 0));
    }
  }
}
void out(int node, int state) {
  int parity = (state + ed[node]) % 2;
  if (parity % 2 == 0) {
    if (on[node] % 2 == 0) {
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) out(cur, 1);
      }
      cout << node + 1 << endl;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) continue;
        out(cur, 0);
      }
    } else {
      int mark = -1;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) out(cur, 1);
        if (dp[cur][1] == 1 && dp[cur][0] == 1 && mark == -1) {
          out(cur, 1);
          mark = cur;
        }
      }
      cout << node + 1 << endl;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node] || cur == mark) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) continue;
        out(cur, 0);
      }
    }
  } else {
    if (on[node] % 2 == 1) {
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) out(cur, 1);
      }
      cout << node + 1 << endl;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) continue;
        out(cur, 0);
      }
    } else {
      int mark = -1;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node]) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) out(cur, 1);
        if (dp[cur][1] == 1 && dp[cur][0] == 1 && mark == -1) {
          out(cur, 1);
          mark = cur;
        }
      }
      cout << node + 1 << endl;
      for (int i = 0; i < v[node].size(); i++) {
        int cur = v[node][i];
        if (cur == P[node] || cur == mark) continue;
        if (dp[cur][1] == 1 && dp[cur][0] == 0) continue;
        out(cur, 0);
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x != 0) {
      x--;
      v[x].push_back(i);
      v[i].push_back(x);
    }
  }
  dfs(0);
  if (dp[0][0] == 1) {
    cout << "YES\n";
    out(0, 0);
  } else {
    cout << "NO\n";
    return 0;
  }
}
