#include <bits/stdc++.h>
using namespace std;
vector<int> t[400200];
int dis[400200], ind[400200];
long long cnt[400200];
queue<int> q;
vector<int> p;
int n, m, num;
int main() {
  cin >> n >> m;
  int x, y;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    t[y].push_back(x);
  }
  cin >> num;
  for (int i = 1; i <= num; i++) {
    cin >> x;
    p.push_back(x);
  }
  memset(dis, -1, sizeof(dis));
  q.push(x);
  dis[x] = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < t[x].size(); i++) {
      int y = t[x][i];
      if (dis[y] == -1) {
        dis[y] = dis[x] + 1;
        q.push(y);
      }
    }
  }
  for (int x = 1; x <= n; x++)
    for (int i = 0; i < t[x].size(); i++) {
      int y = t[x][i];
      if (dis[x] + 1 == dis[y]) ind[y] += 1;
    }
  memset(cnt, 0, sizeof(cnt));
  x = p[num - 1];
  q.push(x);
  cnt[x] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < t[x].size(); i++) {
      int y = t[x][i];
      if (dis[x] + 1 == dis[y]) {
        cnt[y] += cnt[x];
        if ((--ind[y]) == 0) {
          q.push(y);
        }
      }
    }
  }
  int ans[2] = {0, 0};
  for (int i = 0; i < num - 1; i++) {
    x = p[i];
    y = p[i + 1];
    if (dis[x] != dis[y] + 1) {
      ans[0] += 1;
      ans[1] += 1;
    } else if (cnt[x] != cnt[y]) {
      ans[1] += 1;
    }
  }
  cout << ans[0] << ' ' << ans[1] << endl;
  return 0;
}
