///Efectiv de ce intra acest lucru in timp

#include <iostream>
#include <vector>
#include <map>
#pragma GCC optimize("O3")
#define pi std::pair<int, int>

const int nmax = 4e5 + 5;

std::vector<int>fibo={1, 1};
std::vector<bool>isf(nmax, 0);
std::vector<int>l[nmax];
std::map<pi, int>nono;
int dim[nmax][100];

bool solve(int node, int last, int sz, int dimcst) {
	if(sz==1) return true;
	if(!isf[sz]) return false;
	dim[node][dimcst] = 1;
	for(int next:l[node]) if(last!=next and nono.find({node, next})==nono.end() and nono.find({next, node})==nono.end()) {
		if(solve(next, node, sz, dimcst)) return true;
		dim[node][dimcst] += dim[next][dimcst];
	}
	int x = dim[node][dimcst];
	if(!isf[x] or !isf[sz-x]) return false;
	nono[{node, last}] = 1;
	if(solve(node, -1, x, dimcst + 1) and solve(last, -1, sz - x, dimcst+1)) return true;
	nono.erase({node, last});
	return false;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	std::cout.tie(0);
	int n, u, v;
	std::cin>>n;
	isf[1] = true;
	while(fibo.back()<=n) fibo.push_back(fibo[fibo.size()-2] + fibo[fibo.size()-1]), isf[fibo.back()]=true;
	fibo.pop_back();
	for(int i=1;i<n;i++) {
		std::cin>>u>>v;
		l[u].push_back(v);
		l[v].push_back(u);
	}
	if(fibo.back()!=n) {
		std::cout<<"No";
		return 0;
	}
	std::cout<<((solve(1, -1, n, 0))?"Yes":"No");
}