#include <bits/stdc++.h>
using namespace std;
queue<int> q;
vector<int> e[200010], g[200010];
int n, m, k, tot, a[200010], dis[200010], ans1 = 0, ans2 = 0;
bool vis[200010];
void BFS(int now) {
  q.push(now);
  vis[now] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (auto y : e[x])
      if (!vis[y]) q.push(y), dis[y] = dis[x] + 1, vis[y] = 1;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[y].push_back(x);
    g[x].push_back(y);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
  BFS(a[k]);
  for (int now = 1; now < k; now++) {
    bool a1 = 0, a2 = 0;
    for (auto y : g[a[now]]) {
      if (dis[y] < dis[a[now + 1]])
        a1 = 1;
      else if (y != a[now + 1] && dis[y] == dis[a[now + 1]])
        a2 = 1;
    }
    if (a1)
      ans1++;
    else if (a2)
      ans2++;
  }
  printf("%d %d", ans1, ans1 + ans2);
}
