#include <bits/stdc++.h>
#pragma GCC optimize("O0")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("-ffloat-store")
using namespace std;
long long n, m, a, b, c, k, temp, x, y;
const int MAXN = 100000 + 11;
inline void read(vector<long long> &v);
inline long long max(long long a, long long b);
inline long long min(long long a, long long b);
inline long long gcd(long long a, long long b);
vector<long long> v[200000];
map<pair<long long, long long>, int> mp;
bool at[200000];
int mxdepth[200000];
long long ans[200000], finaltime[200000], finaldepth[200000], finalans[200000];
void dfs(int u, int p = -1) {
  multiset<int, greater<int>> ms;
  if (at[u]) ms.insert(0);
  for (auto &x : v[u]) {
    if (x == p) continue;
    dfs(x, u);
    if (mxdepth[x] == -1) continue;
    ms.insert(mxdepth[x] + 1);
  }
  if (ms.size()) mxdepth[u] = *ms.begin();
}
void dfsforans(int u, int p = -1) {
  for (auto &x : v[u]) {
    if (x == p) continue;
    dfsforans(x, u);
    if (mxdepth[x] == -1) continue;
    ans[u] += 2 + ans[x];
  }
}
void finaldfsdepth(int u, int p = -1) {
  if (p == -1) {
    finaldepth[u] = mxdepth[u];
    multiset<int, greater<int>> ms;
    if (at[u]) ms.insert(0);
    for (auto &x : v[u]) {
      if (mxdepth[x] == -1) continue;
      ms.insert(mxdepth[x] + 1);
    }
    for (auto &x : v[u]) {
      if (mxdepth[x] == -1)
        mp[{u, x}] = finaldepth[u];
      else {
        ms.erase(ms.find(mxdepth[x] + 1));
        if (!ms.size())
          mp[{u, x}] = -1;
        else
          mp[{u, x}] = *ms.begin();
        ms.insert(mxdepth[x] + 1);
      }
    }
  } else {
    finaldepth[u] = mxdepth[u];
    multiset<int, greater<int>> ms;
    if (mp[{p, u}] != -1) {
      finaldepth[u] = max(mxdepth[u], mp[{p, u}] + 1);
      ms.insert(mp[{p, u}] + 1);
    }
    if (at[u]) ms.insert(0);
    for (auto &x : v[u]) {
      if (x == p || mxdepth[x] == -1) continue;
      ms.insert(mxdepth[x] + 1);
    }
    for (auto &x : v[u]) {
      if (x == p) continue;
      if (mxdepth[x] == -1)
        mp[{u, x}] = finaldepth[u];
      else {
        ms.erase(ms.find(mxdepth[x] + 1));
        if (!ms.size())
          mp[{u, x}] = -1;
        else
          mp[{u, x}] = *ms.begin();
        ms.insert(mxdepth[x] + 1);
      }
    }
  }
  for (auto &x : v[u]) {
    if (x == p) continue;
    finaldfsdepth(x, u);
  }
}
void finaldfstime(int u, int p = -1) {
  if (p == -1)
    finaltime[u] = ans[u];
  else {
    finaltime[u] = finaltime[p];
    if (mxdepth[u] != -1) {
      finaltime[u] -= ans[u];
      finaltime[u] -= 2;
    }
    finaltime[u] += ans[u];
    if (mp[{p, u}] != -1) finaltime[u] += 2;
  }
  for (auto &x : v[u])
    if (x != p) finaldfstime(x, u);
}
void solveforthiscase(const int &test) {
  cin >> n >> m;
  for (int i = 0; i < 200000; i++) mxdepth[i] = -1;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    at[a] = true;
  }
  dfs(1);
  dfsforans(1);
  finaldfsdepth(1);
  finaldfstime(1);
  long long mi = 1000000000000000000;
  int root = -1;
  for (int i = 1; i <= n; i++)
    if (finaltime[i] - finaldepth[i] < mi) {
      mi = finaltime[i] - finaldepth[i];
      root = i;
    }
  cout << root << '\n' << mi;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  cin.tie(NULL);
  cout.tie(NULL);
  clock_t start, end;
  start = clock();
  int test = 1;
  for (int i = 1; i <= test; i++) {
    solveforthiscase(i);
  }
  end = clock();
  long double time_taken =
      (long double)(end - start) / (long double)(CLOCKS_PER_SEC);
  if (false)
    cerr << "Time taken by program is : " << (long double)time_taken * 1000
         << " milisec ";
}
inline long long max(long long a, long long b) { return ((a > b) ? a : b); }
inline long long min(long long a, long long b) { return ((a > b) ? b : a); }
inline long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
inline void read(vector<long long> &v) {
  for (int i = 0; i < v.size(); i++) cin >> v[i];
}
