#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long neg = 1, num = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') neg = -1;
  for (; isdigit(c); c = getchar()) num = (num << 1) + (num << 3) + c - '0';
  return neg * num;
}
struct edge {
  long long nxt, to;
} Edge[500010 << 1];
long long n, m, k, p[500010], q[500010], dis[500010], L, R, c1[500010],
    c2[500010];
long long head[500010], cnt;
bool vis[500010];
inline void Add_edge(long long u, long long v) {
  Edge[++cnt].nxt = head[u];
  Edge[cnt].to = v;
  head[u] = cnt;
}
struct node {
  long long w, x;
  inline bool operator<(const node& a) const { return w > a.w; }
};
inline void dijkstra() {
  priority_queue<node> Q;
  memset(dis, 0x3f, sizeof(dis));
  dis[p[k]] = 0;
  Q.push((node){0, p[k]});
  while (!Q.empty()) {
    node u = Q.top();
    Q.pop();
    long long x = u.x;
    if (vis[x]) continue;
    vis[x] = 1;
    for (long long i = head[x]; i; i = Edge[i].nxt) {
      long long v = Edge[i].to;
      if (dis[v] > dis[x] + 1) {
        dis[v] = dis[x] + 1;
        c1[v] = 0;
        if (x ^ q[v])
          c2[v] = 0;
        else
          c2[v] = 1;
        Q.push((node){dis[v], v});
      } else if (dis[v] == dis[x] + 1) {
        c1[v] = 1;
        if (x == q[v]) c2[v] = 1;
      }
    }
  }
}
signed main() {
  n = read();
  m = read();
  for (long long i = 1; i <= m; i++) {
    long long u = read(), v = read();
    Add_edge(v, u);
  }
  k = read();
  for (long long i = 1; i <= k; i++) p[i] = read();
  for (long long i = 1; i < k; i++) q[p[i]] = p[i + 1];
  dijkstra();
  for (long long i = 1; i <= k - 1; i++) {
    if (!c2[p[i]] || c1[p[i]]) R++;
    if (!c2[p[i]]) L++;
  }
  printf("%lld %lld\n", L, R);
  return 0;
}
