#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
vector<int> v[maxn], vv[maxn];
int p[maxn], dis[maxn];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void bfs(int u) {
  dis[u] = 0;
  queue<int> q;
  q.push(u);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = 0; i < v[x].size(); i++) {
      if (dis[v[x][i]] == 100000007) {
        dis[v[x][i]] = dis[x] + 1;
        q.push(v[x][i]);
      }
    }
  }
}
int main() {
  int n, m;
  n = read(), m = read();
  for (int i = 1; i <= n; i++) {
    dis[i] = 100000007;
  }
  for (int i = 1; i <= m; i++) {
    int x, y;
    x = read(), y = read();
    v[y].push_back(x);
    vv[x].push_back(y);
  }
  int t;
  t = read();
  for (int i = 1; i <= t; i++) {
    p[i] = read();
  }
  bfs(p[t]);
  int mx = 0, mi = 0;
  for (int i = 1; i <= t - 1; i++) {
    bool flag = false, ok = false;
    for (int j = 0; j < vv[p[i]].size(); j++) {
      if (vv[p[i]][j] != p[i + 1]) {
        if (dis[vv[p[i]][j]] < dis[p[i + 1]]) flag = true;
        if (dis[vv[p[i]][j]] == dis[p[i + 1]]) ok = true;
      }
    }
    if (flag)
      mi++, mx++;
    else if (ok)
      mx++;
  }
  cout << mi << " " << mx << endl;
  return 0;
}
