#include <bits/stdc++.h>
using namespace std;
int n, m;
int ans0, ans1;
vector<int> G[200010];
int hui[200010];
int vis[200010];
bool a[200010];
bool b[200010];
void bfs(int p) {
  memset(vis, -1, sizeof(vis));
  memset(a, false, sizeof(a));
  memset(b, false, sizeof(b));
  queue<int> que;
  que.push(p);
  vis[p] = 0;
  while (!que.empty()) {
    int cur = que.front();
    que.pop();
    for (auto &e : G[cur]) {
      if (vis[e] == -1) {
        vis[e] = vis[cur] + 1;
        if (hui[e] != -1) {
          if (cur == hui[e])
            a[e] = true;
          else
            b[e] = true;
        }
        que.push(e);
      } else {
        if (vis[e] == vis[cur] + 1) {
          if (hui[e] != -1) {
            if (cur == hui[e])
              a[e] = true;
            else
              b[e] = true;
          }
        }
      }
    }
  }
}
int lu[200010];
int main() {
  int t1, t2, t;
  memset(hui, -1, sizeof(hui));
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &t1, &t2);
    G[t2].push_back(t1);
  }
  scanf("%d", &t);
  t1 = -1;
  for (int i = 0; i < t; ++i) {
    scanf("%d", &t2);
    lu[i] = t2;
    if (t1 != -1) {
      hui[t1] = t2;
    }
    t1 = t2;
  }
  ans0 = ans1 = 0;
  bfs(t2);
  int pre = -1, cur = 0;
  for (int i = 0; i < t; ++i) {
    cur = lu[i];
    if (pre != -1) {
      if (!a[pre]) {
        ++ans0;
        ++ans1;
      } else {
        if (b[pre]) ++ans1;
      }
    }
    pre = cur;
  }
  printf("%d %d\n", ans0, ans1);
  return 0;
}
