#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int n, m, k, b, c, d[200005], a[200005];
vector<int> g[200005], r[200005];
queue<int> q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(30);
  cerr.precision(10);
  ;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    d[i] = (1 << 30);
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    r[v].push_back(u);
  }
  cin >> k;
  for (int i = 1; i <= k; i++) cin >> a[i];
  q.push(a[k]);
  d[a[k]] = 0;
  while ((int)q.size()) {
    int v = q.front();
    q.pop();
    for (auto to : r[v]) {
      if (d[to] > d[v] + 1) {
        d[to] = d[v] + 1;
        q.push(to);
      }
    }
  }
  for (int i = 1; i < k; i++) {
    int ok = 0;
    for (auto to : g[a[i]]) {
      if (d[to] < d[a[i + 1]]) {
        ok = 1;
        break;
      }
    }
    b += ok;
    if (ok) continue;
    for (auto to : g[a[i]]) {
      if (to != a[i + 1] && d[to] == d[a[i + 1]]) {
        c++;
        break;
      }
    }
  }
  cout << b << " " << b + c;
  return 0;
}
