#include <bits/stdc++.h>
using namespace std;
vector<set<int> > adj(130000);
vector<int> vis(130000), par(130000), have_attacks(130000, 0);
void dfs(int node) {
  vis[node] = 1;
  int sd;
  for (typeof((adj[node]).begin()) i = (adj[node]).begin();
       i != (adj[node]).end(); i++) {
    sd = *i;
    if (!vis[sd]) {
      par[sd] = node;
      dfs(sd);
    }
  }
  int flag = 1;
  for (typeof(adj[node].begin()) i = adj[node].begin(); i != adj[node].end();) {
    sd = *i;
    if (sd != par[node]) {
      if (!have_attacks[sd]) {
        i++;
        adj[node].erase(sd);
      } else {
        i++;
        if (flag) {
          have_attacks[node] = 1;
          flag = 0;
        }
      }
    } else {
      i++;
    }
  }
}
int n, m, a, b, dis, nod, nod1, tot;
vector<int> dis1(1);
void bfs(int val) {
  vis.clear();
  tot = 0;
  dis = 0;
  nod1 = 130000;
  dis1.clear();
  dis1.resize(130000);
  dis1[val] = 0;
  vis.resize(130000, 0);
  vis[val] = 1;
  queue<int> bfs_que;
  int flag = 0, flag1 = 1;
  bfs_que.push(val);
  while (!bfs_que.empty()) {
    nod = bfs_que.front();
    tot++;
    dis = max(dis, dis1[nod]);
    bfs_que.pop();
    vis[nod] = 1;
    for (typeof((adj[nod]).begin()) i = (adj[nod]).begin();
         i != (adj[nod]).end(); i++) {
      if (!vis[*i]) {
        bfs_que.push(*i);
        dis1[*i] = dis1[nod] + 1;
        if (dis <= dis1[*i]) {
          if (dis == dis1[*i]) {
            nod1 = min(nod1, *i);
          } else {
            dis = dis1[*i];
            nod1 = *i;
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n - 1; ++i) {
    cin >> a >> b;
    adj[a].insert(b);
    adj[b].insert(a);
  }
  for (int i = 0; i < m; ++i) {
    cin >> a;
    have_attacks[a] = 1;
  }
  if (m == 1) {
    cout << a << '\n' << 0;
    return 0;
  }
  dfs(a);
  bfs(a);
  int ans1 = nod1;
  bfs(nod1);
  cout << min(ans1, nod1) << endl << 2 * (tot - 1) - dis << endl;
  return 0;
}
