#include <bits/stdc++.h>
using namespace std;
const long long N = 400010;
inline long long read() {
  long long s = 0, w = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * w;
}
long long n, m, K, p[N], q[N], dis[N], L, R, book[N], jj[N], ll[N];
long long head[N], maxE;
struct Edge {
  long long nxt, to;
} e[N << 1];
inline void Add(long long u, long long v) {
  e[++maxE].nxt = head[u];
  head[u] = maxE;
  e[maxE].to = v;
}
struct Node {
  long long w, pro;
  inline bool operator<(const Node& a) const { return w > a.w; }
};
inline void Dijk() {
  priority_queue<Node> Q;
  memset(dis, 0x3f, sizeof(dis));
  dis[p[K]] = 0;
  Q.push((Node){0, p[K]});
  while (!Q.empty()) {
    Node now = Q.top();
    Q.pop();
    long long x = now.pro;
    if (book[x]) continue;
    book[x] = 1;
    for (register long long i = head[x]; i; i = e[i].nxt) {
      if (dis[e[i].to] > dis[x] + 1) {
        dis[e[i].to] = dis[x] + 1;
        jj[e[i].to] = 0;
        if (x ^ q[e[i].to])
          ll[e[i].to] = 0;
        else
          ll[e[i].to] = 1;
        Q.push((Node){dis[e[i].to], e[i].to});
      } else if (dis[e[i].to] == dis[x] + 1) {
        jj[e[i].to] = 1;
        if (x == q[e[i].to]) ll[e[i].to] = 1;
      }
    }
  }
}
signed main() {
  n = read(), m = read();
  for (register long long i = 1; i <= m; i++) {
    long long u = read(), v = read();
    Add(v, u);
  }
  K = read();
  for (register long long i = 1; i <= K; i++) p[i] = read();
  for (register long long i = 1; i < K; i++) q[p[i]] = p[i + 1];
  Dijk();
  for (register long long i = K - 1; i; i--) {
    if (!ll[p[i]] || jj[p[i]]) R++;
    if (!ll[p[i]]) L++;
  }
  printf("%lld %lld\n", L, R);
  return 0;
}
