#include <bits/stdc++.h>
using namespace std;
int64_t mod = 1e18;
int64_t mod1 = 1e9 + 5;
int64_t power(int64_t a, int64_t b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0)
    return power((((a % mod) * (a % mod)) % mod), b / 2) % mod;
  else
    return ((a % mod) * (power((((a % mod) * (a % mod)) % mod), b / 2) % mod)) %
           mod;
}
vector<int64_t> v[200000 + 1];
int64_t dis[200001];
int64_t dis1[200001];
vector<int64_t> v1[200001];
int64_t n;
void bfs(int64_t src) {
  dis[src] = 0;
  queue<int64_t> q;
  bool vis[n + 1];
  memset(vis, false, sizeof(vis));
  vis[src] = 1;
  q.push(src);
  while (!q.empty()) {
    int64_t u = q.front();
    q.pop();
    for (auto i : v1[u]) {
      if (vis[i] == false) {
        vis[i] = true;
        dis[i] = dis[u] + 1;
        q.push(i);
      }
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int64_t m;
  cin >> n >> m;
  for (int64_t i = 1; i <= m; i++) {
    int64_t x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v1[y].push_back(x);
  }
  int64_t k;
  cin >> k;
  int64_t a[k + 1];
  for (int64_t i = 1; i <= k; i++) cin >> a[i];
  int64_t sr = a[1], de = a[k];
  bfs(de);
  int64_t mini = 0, maxi = 0;
  int64_t te[n + 1];
  memset(te, 0, sizeof(te));
  for (int64_t i = 1; i <= n; i++) {
    for (auto j : v[i]) {
      if (dis[j] + 1 == dis[i]) te[i] += 1;
    }
  }
  for (int64_t i = 1; i < k; i++) {
    int64_t te1 = a[i + 1];
    if (dis[te1] + 1 > dis[a[i]]) {
      mini++, maxi++;
      continue;
    } else {
      int64_t x = 0;
      if (te[a[i]] > 1) maxi++;
    }
  }
  cout << mini << " " << maxi << '\n';
}
