#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
const int maxn = 1e6 + 5;
inline void read(int& x) {
  char c;
  while (!isdigit(c = getchar()))
    ;
  x = c - '0';
  while (isdigit(c = getchar())) x = (x << 3) + (x << 1) + c - '0';
}
vector<int> p[maxn];
int a[maxn], id[maxn];
struct P {
  int u, w;
  bool operator<(const P& p) const { return w > p.w; }
} poi;
priority_queue<P> que;
int dis[maxn], n, nxt[maxn], nxtt[maxn];
void Dij(int s) {
  int u, v, i;
  bool ju;
  for (i = 0; i <= n; i++) dis[i] = inf;
  dis[s] = 0;
  que.push(P{s, dis[s]});
  while (!que.empty()) {
    poi = que.top();
    que.pop();
    u = poi.u;
    for (i = 0; i < p[u].size(); i++) {
      v = p[u][i];
      if (dis[v] >= dis[u] + 1) {
        if (dis[v] > dis[u] + 1)
          ju = 1;
        else
          ju = 0;
        dis[v] = dis[u] + 1;
        if (nxt[v] != a[id[v] + 1]) nxt[v] = u;
        if (nxtt[v] == a[id[v] + 1] || !nxtt[v]) nxtt[v] = u;
        if (ju) que.push(P{v, dis[v]});
      }
    }
  }
}
int main() {
  int m, k, u, v, num1 = 0, num2 = 0;
  read(n);
  read(m);
  for (int i = 1; i <= m; i++) {
    read(u);
    read(v);
    p[v].push_back(u);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
    id[a[i]] = i;
  }
  Dij(a[k]);
  for (int i = 1; i < k; i++) {
    if (nxt[a[i]] != a[i + 1]) num1++;
    if (nxtt[a[i]] != a[i + 1]) num2++;
  }
  printf("%d %d\n", num1, num2);
}
