#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
set<int> s[maxn];
int n, m, k, a[maxn], dis[maxn];
vector<int> g[maxn];
const int inf = 1e9;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    g[v].push_back(u);
  }
  cin >> k;
  for (int i = 1; i <= k; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) dis[i] = 1e9;
  dis[a[k]] = 0;
  queue<int> q;
  q.push(a[k]);
  while (!q.empty()) {
    auto u = q.front();
    q.pop();
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i];
      if (dis[v] < dis[u] + 1) continue;
      if (dis[v] == dis[u] + 1) {
        s[v].insert(u);
      } else {
        s[v].clear();
        s[v].insert(u);
        dis[v] = dis[u] + 1;
        q.push(v);
      }
    }
  }
  int Min = 0, Max = 0;
  for (int i = 1; i < k; ++i) {
    if (!s[a[i]].count(a[i + 1])) ++Min;
    if (!s[a[i]].count(a[i + 1]) || s[a[i]].size() > 1) ++Max;
  }
  cout << Min << " " << Max << endl;
  return 0;
}
