#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  while (cin >> n >> m) {
    vector<vector<pair<int, int>>> g(n + 1), gr(n + 1);
    for (int i = 0; i < m; ++i) {
      int u, v;
      cin >> u >> v;
      g[u].emplace_back(v, i);
      gr[v].emplace_back(u, i);
    }
    int k;
    cin >> k;
    vector<int> p(k);
    for (auto &e : p) cin >> e;
    int finish = p[k - 1];
    queue<int> que({finish});
    vector<char> used(n + 1);
    vector<char> good_edge(m);
    vector<int> dist(n + 1, n + 10);
    dist[finish] = 0;
    while (!que.empty()) {
      auto v = que.front();
      que.pop();
      for (auto [to, edge_idx] : gr[v]) {
        if (!used[to]) {
          used[to] = true;
          dist[to] = dist[v] + 1;
          que.push(to);
        }
        if (dist[to] == dist[v] + 1) {
          good_edge[edge_idx] = true;
        }
      }
    }
    int mi = 0, ma = 0;
    for (int i = 0; i < k - 1; ++i) {
      int v = p[i];
      bool our_edge_bad = false;
      bool not_our_edge_good = false;
      for (auto [to, edge_idx] : g[v]) {
        if (to == p[i + 1]) {
          if (!good_edge[edge_idx]) {
            our_edge_bad = true;
            break;
          }
        } else {
          if (good_edge[edge_idx]) {
            not_our_edge_good = true;
          }
        }
      }
      if (our_edge_bad) {
        ++mi;
        ++ma;
      } else if (not_our_edge_good) {
        ++ma;
      }
    }
    cout << mi << " " << ma << "\n";
  }
}
