#include <bits/stdc++.h>
using namespace std;
const int N = 123470;
const long long INF = 1e18 + 10;
int n, m;
vector<int> g[N];
int fl[N];
long long down[N], up[N];
int mxdown[N], mxup[N];
int ff[N];
void dfsdown(int v, int p) {
  ff[v] = fl[v];
  for (int i = 0; i < g[v].size(); ++i) {
    int u = g[v][i];
    if (u != p) {
      dfsdown(u, v);
      if (ff[u]) {
        down[v] += down[u] + 2;
      }
      ff[v] |= ff[u];
    }
  }
}
void dfsup(int v, int p) {
  for (int i = 0; i < g[v].size(); ++i) {
    int u = g[v][i];
    if (u != p) {
      int tmp = 2;
      if (down[v] - 2 - down[u] == 0 && up[v] == 0 && !fl[v]) {
        tmp = 0;
      }
      up[u] = down[v] - (ff[u] ? 2 : 0) - down[u] + up[v] + tmp;
      dfsup(u, v);
    }
  }
}
void dfs1(int v, int p, int l) {
  mxup[v] = max(mxup[v], l);
  mxdown[v] = 0;
  for (int i = 0; i < (int)g[v].size(); ++i) {
    int u = g[v][i];
    if (u != p) {
      int tmp = max(mxdown[v], mxup[v]);
      if (tmp || fl[v]) tmp++;
      dfs1(u, v, tmp);
      if (ff[u]) {
        mxdown[v] = max(mxdown[v], mxdown[u] + 1);
      }
    }
  }
}
void dfs2(int v, int p, int l) {
  mxup[v] = max(mxup[v], l);
  mxdown[v] = 0;
  for (int i = (int)g[v].size() - 1; i >= 0; --i) {
    int u = g[v][i];
    if (u != p) {
      int tmp = max(mxdown[v], mxup[v]);
      if (tmp || fl[v]) tmp++;
      dfs2(u, v, tmp);
      if (ff[u]) {
        mxdown[v] = max(mxdown[v], mxdown[u] + 1);
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i < n; ++i) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0, x; i < m; ++i) {
    scanf("%d", &x);
    fl[x] = 1;
  }
  dfsdown(1, 0);
  dfsup(1, 0);
  dfs1(1, 0, 0);
  dfs2(1, 0, 0);
  long long ans = INF;
  int pos = -1;
  for (int i = 1; i <= n; ++i) {
    if (up[i] + down[i] - max(mxup[i], mxdown[i]) < ans) {
      ans = up[i] + down[i] - max(mxup[i], mxdown[i]);
      pos = i;
    }
  }
  printf("%d\n%I64d\n", pos, ans);
  return 0;
}
