#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n, m, k;
int a[maxn];
vector<int> G[maxn], g[maxn];
int vis[maxn], dis[maxn];
void dij() {
  for (int i = 1; i <= n; i++) {
    vis[i] = 0;
    dis[i] = 1e9;
  }
  queue<int> q;
  q.push(a[k]);
  dis[a[k]] = 0;
  while (q.size()) {
    int u = q.front();
    q.pop();
    if (vis[u]) continue;
    vis[u] = 1;
    for (int i = 0; i < G[u].size(); i++) {
      int v = G[u][i];
      if (dis[u] + 1 < dis[v]) {
        dis[v] = dis[u] + 1;
        q.push(v);
      }
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    g[u].push_back(v);
    G[v].push_back(u);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
  dij();
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i < k; i++) {
    int u = a[i], v = a[i + 1];
    if (dis[u] != dis[v] + 1) {
      ++ans1;
      ++ans2;
    } else {
      for (int j = 0; j < g[u].size(); j++) {
        int x = g[u][j];
        if (dis[u] == dis[x] + 1 && x != v) {
          ++ans2;
          break;
        }
      }
    }
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
