#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &n) {
  n = 0;
  T f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (isdigit(c)) n = n * 10 + c - '0', c = getchar();
  n *= f;
}
int n, m, k, cnt;
int head[500005], Next[500005], vet[500005];
int dis[500005], vis[500005], a[500005];
vector<int> g[500005];
void add(int x, int y) {
  cnt++;
  Next[cnt] = head[x];
  head[x] = cnt;
  vet[cnt] = y;
}
void bfs() {
  queue<int> q;
  q.push(a[k]);
  dis[a[k]] = 0, vis[a[k]] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = head[x]; i; i = Next[i]) {
      int v = vet[i];
      if (vis[v]) continue;
      dis[v] = dis[x] + 1;
      vis[v] = 1;
      q.push(v);
    }
  }
}
int main() {
  cin >> n >> m;
  int x, y;
  for (int i = 1; i <= m; i++) {
    read(x), read(y);
    add(y, x);
    g[x].push_back(y);
  }
  cin >> k;
  for (int i = 1; i <= k; i++) {
    read(a[i]);
  }
  bfs();
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i < k; i++) {
    if (dis[a[i + 1]] + 1 > dis[a[i]]) {
      ans1++, ans2++;
      continue;
    }
    int cnt = 0;
    for (int j = 0; j < g[a[i]].size(); j++) {
      int v = g[a[i]][j];
      if (dis[v] + 1 == dis[a[i]]) cnt++;
    }
    if (cnt > 1) ans2++;
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
