#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
const long long md = 1e9 + 7;
long long n, m, u, v, k, d[200501], que[200501][3], queE, queB, i, j, mn, mx, a;
vector<long long> p, rc[200501], c[200501];
bool used[200501], f;
void add(long long nom, long long dist) {
  if (used[nom]) return;
  d[nom] = dist;
  que[queE][1] = nom;
  que[queE][2] = dist;
  used[nom] = true;
  queE++;
}
void bfs(long long nom) {
  long long dist;
  queE = 1;
  queB = 0;
  add(nom, 0);
  while (queE - 1 != queB) {
    queB++;
    nom = que[queB][1];
    dist = que[queB][2];
    for (i = 0; i < rc[nom].size(); i++) add(rc[nom][i], dist + 1);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    cin >> u >> v;
    rc[v].push_back(u);
    c[u].push_back(v);
  }
  cin >> k;
  for (i = 1; i <= k; i++) {
    cin >> a;
    p.push_back(a);
  }
  bfs(p[k - 1]);
  for (i = 1; i < k; i++) {
    if (d[p[i]] + 1 != d[p[i - 1]]) {
      mn++;
      mx++;
      continue;
    }
    f = false;
    for (j = 0; j < c[p[i - 1]].size(); j++) {
      if (d[c[p[i - 1]][j]] == d[p[i]] && c[p[i - 1]][j] != p[i]) {
        f = true;
        break;
      }
    }
    mx += f;
  }
  cout << mn << " " << mx << '\n';
  return 0;
}
