func_code_string: #include <bits/stdc++.h>   using namespace std;   long long mod = (1000000007LL);   inline long long mult(long long a, long long b) { return (a * b) % mod; }   inline long long poww(long long a, long long b) {     long long res = 1;     while (b > 0) {       if (b & 1) res = (res * a) % mod;       a = (a * a) % mod;       b >>= 1;     }     return res;   }   long long gcd(long long a, long long b) {     while (b) {       a %= b;       swap(a, b);     }     return a;   }   int n, m, q, k, v[300050], ans;   pair<int, int> w[300050];   string second;   int leaf[300050], root, dp[300050], qtd[300050][2];   int ini[300050], yes = 1;   vector<int> grafo[300050];   void dfs(int x, int p) {     int can = 0;     if (leaf[x] and dp[x] == 1) yes = 0;     for (auto v : grafo[x]) {       if (v == p) continue;       if (leaf[v]) can = 1;       dp[v] = (dp[x] ^ 1);       dfs(v, x);       for (int j = 0; j < 2; j++) {         if (qtd[x][j] > 0 and qtd[v][j ^ dp[v] ^ 1]) yes = 0;       }       qtd[x][0] += qtd[v][0];       qtd[x][1] += qtd[v][1];     }     if ((can or p == root) and !leaf[x]) ans++;   }   int32_t main() {     ios::sync_with_stdio(false);     cin.tie(0);     cin >> n;     for (int i = 1; i < n; i++) {       int a, b;       cin >> a >> b;       grafo[a].push_back(b);       grafo[b].push_back(a);     }     ans = n - 1;     root = 1;     for (int i = 1; i <= n; i++) {       if ((int)(grafo[i]).size() == 1) leaf[i] = 1, root = i, ans--;     }     dfs(root, root);     cout << (yes ? 1 : 3) <<     << ans <<   n ;   }   