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:
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// gp_hash_table<int, int> mapka;

using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

template<class C> void mini(C &a4, C b4) { a4 = min(a4, b4); }
template<class C> void maxi(C &a4, C b4) { a4 = max(a4, b4); }

template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
  while(*sdbg!=',')cerr<<*sdbg++;
  cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}

template<class T> ostream &operator<<(ostream& os, vector<T> V) {
  os << "["; for (auto vv : V) os << vv << ","; return os << "]";
}
template<class L, class R> ostream &operator<<(ostream &os, pair<L,R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}

#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif

void nope(){
  cout << "NO\n";
  exit(0);
}
vector<set<int>> d;
vector<int> fib;

map<vector<PII>, bool> pam;

vector<int> vis;
int ivis = 5;
vector<PII> gd;
int gl1,gl2; 
int dfs(int v,int oj){
  int siz = 1;
  vis[v] = ivis;
  debug(v);
  for(int el:d[v])if(el != oj){
    siz += dfs(el,v);
  }
  if(siz == gl1){
    gd.PB({v,oj});
  }else if(siz == gl2){
    gd.PB({oj,v});
  }
  return siz;
}
int n;
bool licz(int siz, int root, vector<PII> zak){
  if(fib[siz] <= 3)return 1;
  gl1 = fib[siz-1];
  gl2 = fib[siz-2];
  
  ivis++;
  debug(fib[siz]);
  gd.clear();
  dfs(root, -1);
  
  vector<PII> pom;
  for(PII el:zak){
    if(vis[el.FI] == ivis){
      pom.PB(el);
    }else if(vis[el.SE] == ivis){
      swap(el.FI,el.SE);
      pom.PB(el);
    }
  }
  sort(ALL(pom));
  debug(pom);
  auto xxx = pam.find(pom);
  if(xxx != pam.end())return xxx->SE; 
  bool res = &pam[pom];
  res = 0;
  R(i,SZ(gd)){
    PII el = gd[i];
    pom.PB(el);
    d[el.FI].erase(el.SE);
    d[el.SE].erase(el.FI);
    if(licz(siz - 1, el.FI, pom) && licz(siz - 2, el.SE, pom))return res = 1;
    d[el.FI].insert(el.SE);
    d[el.SE].insert(el.FI);
    pom.pop_back();
  }
  return 0;
}

int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  fib.resize(30);
  fib[0] = fib[1] = 1;
  for(int i = 2; i<30; i++){
    fib[i] = fib[i-1] + fib[i-2];
  }
  debug(fib);
  cin >> n;
  d.resize(n);
  vis.resize(n);
  int kt = 0;
  while(fib[kt] < n)kt++;
  if(fib[kt] != n)nope();
  R(i,n-1){
    int a,b;
    cin >> a >> b;
    a--;b--;
    d[a].insert(b);
    d[b].insert(a);
  }
  if(licz(kt, 0, {})){
    cout << "YES\n";
  }else{
    cout << "NO\n";
  }
}