#include <bits/stdc++.h>
using namespace std;
const int inf = 111111111;
void io() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(15);
}
long long mulmod(long long a, long long b, long long m) {
  long long q = (long long)(((long double)a * (long double)b) / (long double)m);
  long long r = a * b - q * m;
  if (r > m) r %= m;
  if (r < 0) r += m;
  return r;
}
template <typename T>
T mod(T a, T b) {
  while (a < 0) a += b;
  return a % b;
}
template <typename T>
T power(T e, T n, T m) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = mod(x * p, m);
    p = mod(p * p, m);
    n >>= 1;
  }
  return x;
}
template <typename T>
T power(T e, T n) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = x * p;
    p = p * p;
    n >>= 1;
  }
  return x;
}
template <typename T>
T InverseEuler(T a, T m) {
  return (a == 1 ? 1 : power(a, m - 2, m));
}
template <typename T>
T gcd(T a, T b) {
  return __gcd(a, b);
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
int exEuclid(int a, int b, int &x, int &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  int x1, y1;
  int g = exEuclid(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return g;
}
vector<int> g[123458];
vector<int> t[123458];
bool vis[123458];
bool mark[123458];
int dis[123458];
int mx_d;
int v;
bool dfs_build(int u) {
  vis[u] = 1;
  bool res = mark[u], f;
  for (__typeof(g[u].begin()) it = g[u].begin(); it != g[u].end(); it++) {
    if (vis[*it] == 0) {
      f = dfs_build(*it);
      if (f) t[u].push_back(*it), t[*it].push_back(u);
      res |= f;
    }
  }
  return res;
}
void dfs_dis(int u, int d = 0) {
  if (d > mx_d) {
    mx_d = d;
    v = u;
  } else if (d == mx_d) {
    v = min(v, u);
  }
  vis[u] = 1;
  dis[u] = d;
  for (__typeof(t[u].begin()) it = t[u].begin(); it != t[u].end(); it++) {
    if (!vis[*it]) {
      dfs_dis(*it, d + 1);
    }
  }
}
int main(int argc, char *argv[]) {
  io();
  int u, n, m;
  cin >> n >> m;
  for (__typeof(n - 1) i = 1; i <= n - 1; ++i) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int a;
  for (__typeof(m) i = 1; i <= m; ++i) {
    cin >> a;
    mark[a] = 1;
  }
  int root = 1;
  while (!mark[root]) root++;
  assert(mark[root]);
  dfs_build(root);
  v = 123458;
  memset(vis, 0, sizeof(vis));
  v = 123458;
  dfs_dis(root);
  mx_d = 0;
  memset(vis, 0, sizeof(vis));
  memset(dis, 0, sizeof(dis));
  int vv = v;
  v = 123458;
  dfs_dis(vv);
  v = min(v, vv);
  cout << v << '\n';
  int e = 0;
  for (__typeof(n) i = 1; i <= n; ++i) {
    e += (int)(t[i].size());
  }
  cout << (e - mx_d) << '\n';
  return 0;
}
