#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5;
const long long mod = 1e9 + 7;
inline long long read() {
  register long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  return (neg ? -s : s);
}
long long a, b, c, dis[N + 10], sum[N + 10], p[N + 10];
bool vis[N + 10];
vector<long long> st[N + 10];
inline void dij(long long n) {
  queue<long long> qu;
  memset(dis, 0x3f, sizeof(dis));
  dis[n] = 0;
  sum[n] = 1;
  qu.push(n);
  while (!qu.empty()) {
    long long u = qu.front();
    vis[u] = 0;
    qu.pop();
    for (long long i = 0; i < st[u].size(); i++) {
      long long v = st[u][i];
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        sum[v] = sum[n];
        if (!vis[v]) {
          vis[v] = 1;
          qu.push(v);
        }
      } else if (dis[v] == dis[u] + 1) {
        sum[v] = sum[n] + 1;
        if (!vis[v]) {
          vis[v] = 1;
          qu.push(v);
        }
      }
    }
  }
}
signed main() {
  a = read();
  b = read();
  long long x, y;
  for (long long i = 1; i <= b; i++) {
    x = read();
    y = read();
    st[y].push_back(x);
  }
  c = read();
  for (long long i = 1; i <= c; i++) p[i] = read();
  dij(p[c]);
  long long mn = 0, mx = 0;
  for (long long i = 1; i < c; i++) {
    if (dis[p[i]] == dis[p[i + 1]] + 1) {
      if (sum[p[i]] > 1) mx++;
    } else
      mn++, mx++;
  }
  printf("%lld %lld", mn, mx);
  return 0;
}
