#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 2e5;
vector<int> g[N];
int a[N], mark[N], dis[N], h[N];
int mpow(int base, int exp);
void ipgraph(int n, int m);
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int dia, L, R;
bool dfs(int u, int par) {
  bool lo = mark[u];
  h[u] = 1 + h[par];
  for (int v : g[u]) {
    if (v == par) continue;
    lo |= dfs(v, u);
  }
  mark[u] = lo;
  return lo;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, i, u, v, x, s;
  cin >> n >> m;
  dia = 0;
  for (i = 0; i < n - 1; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  memset(mark, 0, sizeof(mark));
  while (m--) {
    cin >> x;
    R = x;
    mark[x] = 1;
  }
  h[0] = -1;
  L = mod;
  dfs(R, 0);
  for (i = 1; i < n + 1; i++) {
    if (mark[i] and h[i] > h[R]) R = i;
  }
  dfs(R, 0);
  int tot = 0, D = 0;
  for (i = 1; i < n + 1; i++) {
    tot += mark[i];
    if (mark[i] and h[i] > D) D = h[i];
  }
  for (i = 1; i < n + 1; i++) {
    if (mark[i] and h[i] == D) R = min(R, i);
  }
  cout << R << endl << (tot - 1) * 2 - D << endl;
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
void ipgraph(int n, int m) {
  int i, u, v;
  while (m--) {
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    g[v - 1].push_back(u - 1);
  }
}
