#include <bits/stdc++.h>
using namespace std;
vector<int> g[200005];
int imp[200005] = {}, ac[200005] = {}, tour[200005] = {};
multiset<int> mdep[200005];
int ans = INT_MAX, ind;
void calcimp(int u, int par) {
  for (auto v : g[u]) {
    if (v != par) {
      calcimp(v, u);
      imp[u] += imp[v];
    }
  }
}
void calctour(int u, int par) {
  for (auto v : g[u]) {
    if (v != par && imp[v]) {
      calctour(v, u);
      tour[u] += 2 + tour[v];
    }
  }
}
void calcmdep(int u, int par) {
  if (ac[u]) mdep[u].insert(1);
  for (auto v : g[u]) {
    if (v != par && imp[v]) {
      calcmdep(v, u);
      if (mdep[v].size()) {
        mdep[u].insert(*mdep[v].rbegin() + 1);
      }
    }
  }
  while (mdep[u].size() > 2) {
    mdep[u].erase(mdep[u].begin());
  }
}
void solve(int u, int par) {
  int val = tour[u] - *mdep[u].rbegin() + 1;
  if (val <= ans) {
    if (ans == val) {
      ind = min(ind, u);
    } else {
      ind = u;
    }
    ans = val;
  }
  set<int>::iterator it;
  for (auto v : g[u]) {
    if (v != par && imp[v]) {
      imp[u] -= imp[v];
      int vmdep = *mdep[v].rbegin() + 1;
      it = mdep[u].find(vmdep);
      if (it != mdep[u].end()) mdep[u].erase(it);
      tour[u] -= 2 + tour[v];
      imp[v] += imp[u];
      if (mdep[u].size()) mdep[v].insert(*mdep[u].rbegin() + 1);
      if (mdep[v].size() > 2) {
        mdep[v].erase(mdep[v].begin());
      }
      if (imp[u]) {
        tour[v] += 2 + tour[u];
      }
      solve(v, u);
      imp[v] -= imp[u];
      int umdep = *mdep[u].rbegin() + 1;
      it = mdep[v].find(umdep);
      if (it != mdep[v].end()) mdep[v].erase(it);
      if (imp[u]) {
        tour[v] -= 2 + tour[u];
      }
      imp[u] += imp[v];
      if (mdep[v].size()) mdep[u].insert(*mdep[v].rbegin() + 1);
      if (mdep[u].size() > 2) {
        mdep[u].erase(mdep[u].begin());
      }
      tour[u] += 2 + tour[v];
    }
  }
  return;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0, u, v; i < n - 1; i++) {
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int att;
  for (int i = 0; i < m; i++) {
    cin >> att;
    att--;
    imp[att] = 1;
    ac[att] = 1;
  }
  calcimp(att, -1);
  calctour(att, -1);
  calcmdep(att, -1);
  solve(att, -1);
  cout << ind + 1 << endl;
  cout << ans << endl;
  return 0;
}
