#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265359;
const long long MOD = (long long)998244353ll;
const long long MAXN = (long long)123456 + 10;
const long long INF = (long long)2242545357980376863;
const long double EPS = (long double)1e-8;
long long in[MAXN], dan[MAXN];
set<long long> g[MAXN];
queue<long long> q;
void rem(long long node) {
  for (auto adj : g[node]) g[adj].erase(node);
  g[node].clear();
}
pair<long long, long long> DFS(long long node, long long par) {
  long long ans = 0;
  long long far = node;
  pair<long long, long long> res;
  for (auto adj : g[node]) {
    if (adj == par) continue;
    res = DFS(adj, node);
    if (ans == res.second + 1) {
      if (res.first < far) far = res.first;
    }
    if (ans < res.second + 1) {
      ans = res.second + 1;
      far = res.first;
    }
  }
  return {far, ans};
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  long long e = n - 1;
  long long u, v;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    g[u].insert(v);
    g[v].insert(u);
  }
  long long ci;
  if (m == 1) {
    cin >> ci;
    cout << ci << endl << 0 << endl;
    return 0;
  }
  long long last;
  for (int i = 0; i < m; i++) {
    cin >> ci;
    dan[ci] = 1;
    last = ci;
  }
  for (int i = 1; i <= n; i++) {
    if (g[i].size() == 1) q.push(i);
  }
  long long fr, par;
  while (q.size()) {
    fr = q.front();
    q.pop();
    if (dan[fr] == 1) continue;
    par = *g[fr].begin();
    rem(fr);
    e--;
    if (g[par].size() == 1) {
      q.push(par);
    }
  }
  cerr << "\"c1\""
       << " = "
       << "c1" << endl;
  pair<long long, long long> res = DFS(last, -1);
  pair<long long, long long> ans = DFS(res.first, -1);
  cout << min(res.first, ans.first) << endl;
  cout << 2 * e - ans.second;
  return 0;
}
