#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int M = 51;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
bool is[N];
vector<int> adj[N];
int mx[N], max_id[N];
void dfs(int node, int p) {
  mx[node] = -100000;
  if (is[node]) mx[node] = 0, max_id[node] = node;
  for (int i = 0; i < adj[node].size(); i++) {
    int to = adj[node][i];
    if (to - p) {
      dfs(to, node);
      if (mx[to] + 1 > mx[node]) {
        mx[node] = mx[to] + 1;
        max_id[node] = max_id[to];
      }
    }
  }
}
int MAX = 0, sol = 0;
void d(int node, int p, int upmax, int id) {
  int ret = 0;
  if (is[node]) {
    ret = mx[node];
    if (upmax > MAX || (upmax == MAX && min(id, node) < sol)) {
      sol = min(id, node);
      MAX = upmax;
    }
    if (upmax == -1) upmax = 0;
    if (id == -1) id = node;
  }
  multiset<pair<int, int> > st;
  for (int i = 0; i < adj[node].size(); i++) {
    int to = adj[node][i];
    if (to == p) continue;
    st.insert(pair<int, int>(mx[to], -max_id[to]));
  }
  for (int i = 0; i < adj[node].size(); i++) {
    int to = adj[node][i];
    if (to == p) continue;
    st.erase(st.find(pair<int, int>(mx[to], -max_id[to])));
    int tmp = upmax, tmp_node = id;
    if (st.size()) {
      tmp = max(tmp, (--st.end())->first + 1);
      if ((--st.end())->first + 1 > upmax) tmp_node = -(--st.end())->second;
    }
    st.insert(pair<int, int>(mx[to], -max_id[to]));
    d(to, node, tmp + 1, tmp_node);
  }
}
int get(int node, int p) {
  int ret = 0;
  for (int i = 0; i < adj[node].size(); i++) {
    int to = adj[node][i];
    if (to == p) continue;
    if (mx[to] < 0) continue;
    ret += 1 + get(to, node);
  }
  return ret;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  int random_node = 0;
  for (int i = 0; i < m; i++) {
    int a;
    scanf("%d", &a);
    is[a] = 1;
    random_node = a;
  }
  sol = random_node;
  dfs(random_node, 0);
  d(random_node, 0, -1, -1);
  cout << sol << endl << 2 * get(random_node, 0) - MAX << endl;
  return 0;
}
