#include <bits/stdc++.h>
const int P = 998244353;
using namespace std;
template <class T>
using vector2D = vector<vector<T>>;
template <class T>
using vector3D = vector<vector2D<T>>;
template <class T>
bool umax(T &x, T y) {
  return (x < y) ? x = y, true : false;
}
template <class T>
bool umin(T &x, T y) {
  return (x > y) ? x = y, true : false;
}
void prepare() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
struct TREE {
  struct edge {
    int to;
    long long c;
  };
  int n, root;
  vector<long long> len;
  vector<vector<edge>> go;
  vector<int> fa, sz, dep, son, top, lno, rno, pos;
  void init(int n_, int root_) {
    n = n_;
    root = root_;
    pos.clear();
    fa.assign(n, -1);
    sz.assign(n, 1);
    go.assign(n, {});
    dep.assign(n, 0);
    len.assign(n, 0);
    son.assign(n, -1);
    top.assign(n, -1);
    lno.assign(n, -1);
    rno.assign(n, -1);
  }
  void add(int u, int v, long long w = 0) {
    go[u].push_back({v, w});
    go[v].push_back({u, w});
  }
  int deg(int x) { return go[x].size(); }
  int lca(int x, int y) {
    for (; top[x] != top[y]; x = fa[top[x]])
      if (dep[top[x]] < dep[top[y]]) swap(x, y);
    if (dep[x] > dep[y]) swap(x, y);
    return x;
  }
  bool multison(int x) {
    return ((x == root) && (deg(x) >= 2)) || (deg(x) >= 3);
  }
  bool isleave(int x) { return ((x != root) && (deg(x) == 1)); }
  void _dfs1(int x) {
    for (auto &e : go[x])
      if (e.to != fa[x]) {
        dep[e.to] = dep[x] + 1;
        len[e.to] = len[x] + e.c;
        fa[e.to] = x;
        _dfs1(e.to);
        sz[x] += sz[e.to];
        if (son[x] == -1 || sz[e.to] > sz[son[x]]) son[x] = e.to;
      }
  }
  void _dfs2(int x) {
    lno[x] = ((int)(pos).size());
    pos.push_back(x);
    if (~son[x]) {
      top[son[x]] = top[x];
      _dfs2(son[x]);
      for (auto &e : go[x])
        if (e.to != fa[x] && e.to != son[x]) _dfs2(top[e.to] = e.to);
    }
    rno[x] = ((int)(pos).size());
  }
  void build() {
    _dfs1(root);
    _dfs2(top[root] = root);
  }
  int dist(int x, int y) { return dep[x] + dep[y] - 2 * dep[lca(x, y)]; }
  void solve(int m) {
    vector<int> a(m);
    for (int i = 0; i < (m); i++) cin >> a[i], --a[i];
    sort((a).begin(), (a).end(), [&](int x, int y) { return lno[x] < lno[y]; });
    int ans = 0;
    for (int i = 0; i < (((int)(a).size())); i++) {
      int x = a[i];
      int y = (i + 1 == ((int)(a).size())) ? a[0] : a[i + 1];
      ans += dist(x, y);
    }
    auto fart = [&](int x) {
      pair<int, int> res(-1, 0);
      for (int i = 0; i < (((int)(a).size())); i++) {
        pair<int, int> cur(dist(x, a[i]), n - a[i]);
        umax(res, cur);
      }
      return pair<int, int>(res.first, n - res.second);
    };
    auto r1 = fart(a[0]);
    auto r2 = fart(r1.second);
    ;
    cout << min(r1.second, r2.second) + 1 << endl;
    cout << ans - r2.first << endl;
  }
} tr;
int main() {
  prepare();
  int n, m;
  cin >> n >> m;
  tr.init(n, 0);
  for (int i = 0; i < (n - 1); i++) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    tr.add(u, v);
  }
  tr.build();
  tr.solve(m);
  return 0;
}
