#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int MOD2 = 1e9 + 7;
int n, m;
vector<int> G[200005];
int dis[200005];
vector<int> shouldto[200005];
int a[200005];
queue<int> Q;
void dijkstra(int s) {
  for (int i = 1; i <= n; ++i) {
    dis[i] = 1e9;
    shouldto[i].clear();
  }
  dis[s] = 0;
  Q.push(s);
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    for (int v : G[u]) {
      if (dis[v] > dis[u] + 1) {
        shouldto[v].clear();
        dis[v] = dis[u] + 1;
        Q.push(v);
      }
      if (dis[v] == dis[u] + 1) shouldto[v].push_back(u);
    }
  }
}
void solve() {
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 1; i <= n; ++i) G[i].clear();
    while (m--) {
      int u, v;
      scanf("%d%d", &u, &v);
      G[v].push_back(u);
    }
    int k;
    scanf("%d", &k);
    for (int i = 1; i <= k; ++i) scanf("%d", &a[i]);
    dijkstra(a[k]);
    int minans = 0, maxans = 0;
    for (int i = 1; i < k; ++i) {
      int cur = a[i];
      int to = a[i + 1];
      bool cnt = 0;
      for (int v : shouldto[cur]) {
        if (v == to) {
          cnt = 1;
          break;
        }
      }
      if (!cnt) ++minans;
      if (shouldto[cur].size() >= 2 || !cnt) ++maxans;
    }
    printf("%d %d\n", minans, maxans);
  }
}
int main() {
  int T = 1;
  for (int i = 1; i <= T; ++i) {
    solve();
  }
}
