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 JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.lang.*; 
public class Main3 {
    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
 
        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(
                new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    if (cnt != 0) {
                        break;
                    }
                    else {
                        continue;
                    }
                }
                buf[cnt++] = (byte)c;
            }
            return new String(buf, 0, cnt);
        }
 
        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
 
            if (neg)
                return -ret;
            return ret;
        }
 
        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
 
        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
 
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
 
            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }
 
            if (neg)
                return -ret;
            return ret;
        }
 
        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0,
                                 BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
 
        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
 
        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
 
    
    public static void main(String[] args) throws IOException{
        OutputStream outputStream = System.out;
        sc = new Reader();
        pw = new PrintWriter(outputStream);
        solve();
        pw.close();
    }
    static PrintWriter pw;
    static Reader sc;
    static int[] subTreeCnt;
    static int pu, pv, kd;
    static List<Integer> fib;
    static List<Pair>  list[];
    public static void solve() throws IOException{
        int t=1;    
        u:while(t-->0){
            int n=sc.nextInt();
            int u,v,val;
            list=new ArrayList[n];
            for(int i=0;i<n;i++)
                list[i]=new ArrayList<>();
            for(int i=0;i<n-1;i++){
                u=sc.nextInt()-1;
                v=sc.nextInt()-1;
                list[u].add(new Pair(v,true));
                list[v].add(new Pair(u,true));
            }
            if(n==1){
                pw.println("YES");
                continue;
            }
            fib=new ArrayList<>();
            fib.add(1);
            fib.add(1);
            for(int i=1;;i++){
                if(fib.get(i)>=n) break;
                val=fib.get(i)+fib.get(i-1);
                fib.add(val);
            }
            if(fib.get(fib.size()-1)!=n) NO();
            // pw.println(fib);
            subTreeCnt=new int[n];
            isFibTree(0,fib.size()-1);
            pw.println("YES");
        }
    }
    public static void countSubTree(int u, int p){
        subTreeCnt[u]=1;
        for(Pair pr:list[u]){
            if(pr.val!=p&&pr.isValid){
                countSubTree(pr.val,u);
                subTreeCnt[u]+=subTreeCnt[pr.val];
            }
        }
    }
    static void NO(){
        pw.println("NO");
        pw.close();
        System.exit(0);
    }
    public static void isFibTree(int u,  int k){
        if(k<=1) return;
        countSubTree(u,-1);
        pu=-1;pv=-1;kd=0;
        dfs(u,-1,k);
        if(pu==-1)NO();
        List<Pair> ll=list[pu];
        int j=0;
        for(Pair pr:ll){
            if(pr.val==pv){
                pr.isValid=false;
                ll.set(j,pr);
                break;
            }
            j++;
        }
        ll=list[pv];
        j=0;
        for(Pair pr:ll){
            if(pr.val==pu){
                pr.isValid=false;
                ll.set(j,pr);
                break;
            }
            j++;
        }
        int p=((kd==k-1)?(k-2):(k-1)),u_=pu,v_=pv;
        isFibTree(v_,kd);
        isFibTree(u_,p);
    }
    public static void dfs(int u, int p, int k){
        int v;
        for(Pair pr:list[u]){
            if(pu!=-1)
                return;
            if(pr.val!=p&&pr.isValid){
                v=pr.val;
                if(subTreeCnt[v]==fib.get(k-1)||subTreeCnt[v]==fib.get(k-2)){
                    pu=u;
                    pv=v;
                    kd=((subTreeCnt[v]==fib.get(k-1))?k-1:k-2);
                    return;
                }
                dfs(v,u,k);
            }
        }
    }
    static class Pair{
        int val;
        boolean isValid;
        Pair(int v, boolean f){
            val=v;
            isValid=f;
        }
     //*
    }
}