Problem: Let F_k denote the k-th term of Fibonacci sequence, defined as below:

  * F_0 = F_1 = 1
  * for any integer n ≥ 0, F_{n+2} = F_{n+1} + F_n



You are given a tree with n vertices. Recall that a tree is a connected undirected graph without cycles.

We call a tree a Fib-tree, if its number of vertices equals F_k for some k, and at least one of the following conditions holds:

  * The tree consists of only 1 vertex;
  * You can divide it into two Fib-trees by removing some edge of the tree. 



Determine whether the given tree is a Fib-tree or not.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of vertices in the tree.

Then n-1 lines follow, each of which contains two integers u and v (1≤ u,v ≤ n, u ≠ v), representing an edge between vertices u and v. It's guaranteed that given edges form a tree.

Output

Print "YES" if the given tree is a Fib-tree, or "NO" otherwise.

You can print your answer in any case. For example, if the answer is "YES", then the output "Yes" or "yeS" will also be considered as correct answer.

Examples

Input


3
1 2
2 3


Output


YES


Input


5
1 2
1 3
1 4
1 5


Output


NO


Input


5
1 3
1 2
4 5
3 4


Output


YES

Note

In the first sample, we can cut the edge (1, 2), and the tree will be split into 2 trees of sizes 1 and 2 correspondently. Any tree of size 2 is a Fib-tree, as it can be split into 2 trees of size 1.

In the second sample, no matter what edge we cut, the tree will be split into 2 trees of sizes 1 and 4. As 4 isn't F_k for any k, it's not Fib-tree.

In the third sample, here is one possible order of cutting the edges so that all the trees in the process are Fib-trees: (1, 3), (1, 2), (4, 5), (3, 4). 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("YES");}else{puts("NO");}
#define MAX_N 200005


int now[MAX_N];
vector<int> have[MAX_N];

int nn = MAX_N; // 複数回根付き木を作成する場合は適宜変える.
vector<int> pre_G[MAX_N];
vector<int> G[MAX_N];
int par_[MAX_N];
int flag_netsukigi[MAX_N];
void make_netsukigi(int r){
    rep(i,have[r].size()){
        int j = have[r][i];
        G[j].clear();
        par_[j] = 0;
        flag_netsukigi[j] = 0;
    }
    queue<int> que;
    que.push(r);
    flag_netsukigi[r] = 1;
    par_[r] = -1;

    while(que.size() > 0){
        int x = que.front();
        que.pop();
        flag_netsukigi[x] = 1;
        rep(i,pre_G[x].size()){
            if(flag_netsukigi[pre_G[x][i]] == 0 && now[pre_G[x][i]] == r){
                par_[pre_G[x][i]] = x;
                G[x].push_back(pre_G[x][i]);
                que.push(pre_G[x][i]);
            }
        }
    }
}

int fib[300] = {};
const int INF = 1001001001;
void fibinit(){
    fib[0] = 1;
    fib[1] = 1;
    srep(i,2,300){
        fib[i] = min(fib[i-1]+fib[i-2], INF); 
        // cout << fib[i] << ' ';
    }
}


int sons[MAX_N];
int dp[MAX_N];

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    fibinit();

    int n;
    cin >> n;
    nn = n;

    rep(i,n-1){
        int a, b;
        cin >> a >> b;
        a--; b--; // 0-indexにするため.
        pre_G[a].push_back(b);
        pre_G[b].push_back(a);
    }

    int tmp_m = *lower_bound(fib,fib+300,n);
    if(tmp_m != n){
        cout << "NO" << endl;
        return 0;
    }


    queue<int> que;
    que.push(0);
    rep(i,n){
        have[0].push_back(i);
    }

    while(que.size() > 0){
        int root = que.front();
        que.pop();
        int m = have[root].size();
        if(m <= 3) continue;
        make_netsukigi(root);

        // cout << "root = " << root << endl;

        int ite = lower_bound(fib,fib+300,m) - fib;
        int target = fib[ite-1];
        int target2 = fib[ite-2];
        
        queue<int> q;
        rep(i,m){
            int y = have[root][i];
            sons[y] = G[y].size();
            dp[y] = 0;
            if(sons[y] == 0){
                q.push(y);
            }
        }
        int next = -1;
        while(q.size() > 0){
            int x = q.front();
            q.pop();
            dp[x]++;

            if(dp[x] == target || dp[x] == target2){
                next = x;
                break;
            }

            

            int pa = par_[x];
            if(par_[x] == -1) continue;
            sons[pa]--;
            dp[pa] += dp[x];
            if(sons[pa] == 0) q.push(pa);
        }
        if(next == -1){
            cout << "NO" << endl;
            return 0;
        }
        vector<int> u, v;
        queue<P> q2;
        q2.push(P(root,root));
        while(q2.size()>0){
            int x = q2.front().first;
            int oya = q2.front().second;
            q2.pop();
            if(x == next) oya = next;
            if(oya == root){
                u.push_back(x);
            }else{
                v.push_back(x);
                now[x] = oya;
            }
            rep(i,G[x].size()){
                int y = G[x][i];
                q2.push(P(y,oya));
            }
        }
        have[root] = u;
        have[next] = v;
        que.push(next);
        que.push(root);
    }

    cout << "YES" << endl;
    return 0;
}