#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 9;
const int mod = 1e9 + 7;
const double eps = 0.00000;
const int inf = 0x3f3f3f3f;
const double Pi = acos(-1.0);
const int N = 5e8 + 1;
inline long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void local() {}
int dis[maxn], p[maxn];
bool vis[maxn];
int head[maxn], Next[maxn], ver[maxn], edge[maxn];
priority_queue<pair<int, int> > q;
int tot;
void add(int x, int y, int z) {
  ver[++tot] = y, edge[tot] = z, Next[tot] = head[x], head[x] = tot;
}
vector<int> g[maxn];
int n, m;
void dijkstra(int x) {
  int start = x;
  memset(vis, false, sizeof(vis));
  memset(dis, inf, sizeof(dis));
  dis[start] = 0;
  q.push(make_pair(0, start));
  while (q.size()) {
    int x = q.top().second;
    q.pop();
    if (vis[x]) continue;
    vis[x] = 1;
    for (int i = head[x]; i; i = Next[i]) {
      int y = ver[i], z = edge[i];
      if (dis[y] > dis[x] + z) {
        dis[y] = dis[x] + z;
        q.push(make_pair(-dis[y], y));
      }
    }
  }
}
int ans1, ans2;
int k;
void dfs(int x) {
  if (x == k) return;
  int u = p[x];
  int y = p[x + 1];
  int num = 0;
  int minn = inf;
  for (auto v : g[u]) {
    if (dis[v] < minn) {
      minn = dis[v];
      num = 0;
    }
    if (dis[v] == minn) num++;
  }
  if (dis[y] == minn && num > 1) {
    ans2++;
  }
  if (dis[y] > minn) {
    ans2++;
    ans1++;
  }
  dfs(x + 1);
}
void init() {
  tot = 1;
  ans1 = ans2 = 0;
  memset(head, 0, sizeof head);
}
int main() {
  local();
  init();
  n = read();
  m = read();
  for (int i = 1; i <= m; i++) {
    int u = read();
    int v = read();
    add(v, u, 1);
    g[u].push_back(v);
  }
  k = read();
  for (int i = 1; i <= k; i++) {
    p[i] = read();
  }
  dijkstra(p[k]);
  dfs(1);
  printf("%d %d\n", ans1, ans2);
}
