#include <bits/stdc++.h>
using namespace std;
const long long nInf = -1000000000;
const long long pInf = 1000000000;
const long long mod = 1000000007;
const int MAXN = 1e5 + 3e4;
void getdata();
void preproc();
void solve();
int n, m, a[MAXN], c[MAXN];
vector<vector<int> > g;
int is[MAXN];
bool is1[MAXN];
int dist[MAXN];
bool is2[MAXN];
int numstart;
int dp[MAXN];
int in1[MAXN];
void dfs(int v, int p);
void dfs1(int v, int p);
void dfs2(int v, int p);
void dfs3(int v, int p);
int main() {
  int t = 1;
  for (int i = 0; i < t; i++) {
    getdata();
    preproc();
    solve();
  }
  return 0;
}
void getdata() {
  scanf("%d %d", &n, &m);
  g.resize(n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    a[i]--;
    is[a[i]] = 0;
    is1[a[i]] = true;
  }
}
int mx1[MAXN];
int mx2[MAXN];
int mxp[MAXN];
void preproc() {}
void solve() {
  numstart = pInf;
  int st = 0;
  fill(mx1, mx1 + n, nInf);
  fill(mx2, mx2 + n, nInf);
  while (st < n && is1[st]) st++;
  if (st == n) {
    st = 0;
  }
  dfs(0, -1);
  dfs3(0, -1);
  int res = -1;
  int in = -1;
  for (int i = 0; i < n; i++) {
    if (is1[i] && res < max(dp[i], mx1[i])) {
      res = max(dp[i], mx1[i]);
      in = i;
    }
  }
  int ty = 0;
  numstart = in;
  dfs2(numstart, -1);
  dfs1(numstart, -1);
  int md;
  res = 0;
  md = 0;
  for (int i = 0; i < n; i++) {
    res = max(res, is[i]);
  }
  for (int i = 0; i < n; i++) {
    if (is1[i]) {
      md = max(md, dist[i]);
    }
  }
  printf("%d\n%d", numstart + 1, res - md);
}
void dfs(int v, int p) {
  bool q = false;
  if (is1[v]) {
    mx1[v] = 0;
  }
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfs(to, v);
  }
  int in = -1;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    if (mx1[to] != nInf && mx1[to] + 1 > mx1[v]) {
      mx1[v] = mx1[to] + 1;
      in = to;
    }
  }
  in1[v] = in;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    if (mx1[to] != nInf && mx1[to] + 1 > mx2[v] && in != to) {
      mx2[v] = mx1[to] + 1;
    }
  }
}
void dfs3(int v, int p) {
  if (p == -1) {
    dp[v] = nInf;
  } else {
    if (in1[p] != v) {
      dp[v] = max(mx1[p], dp[p]) + 1;
    } else {
      dp[v] = max(mx2[p], dp[p]) + 1;
      if (dp[v] < 0 && is1[p]) {
        dp[v] = 1;
      }
    }
  }
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfs3(to, v);
  }
}
void dfs2(int v, int p) {
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dist[to] = dist[v] + 1;
    dfs2(to, v);
    is2[v] = is2[to] | is2[v] | is1[to];
  }
}
void dfs1(int v, int p) {
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfs1(to, v);
    if (is2[to] | is1[to]) {
      is[v] += is[to] + 2;
    }
  }
}
