#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
vector<int> adj[N], rev[N];
int n, m, k, s, t;
int p[N], dist[N];
bool vis[N];
void bfs(int u) {
  queue<pair<int, int> > q;
  q.emplace(u, 0);
  vis[u] = 1;
  while (!q.empty()) {
    u = q.front().first;
    int d = q.front().second;
    q.pop();
    dist[u] = d;
    for (int v : rev[u]) {
      if (!vis[v]) {
        q.emplace(v, d + 1);
        vis[v] = 1;
      }
    }
  }
}
int main(void) {
  scanf("%d%d", &n, &m);
  int u, v;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    rev[v].push_back(u);
  }
  scanf("%d", &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &p[i]);
  }
  s = p[0], t = p[k - 1];
  bfs(t);
  int mn = 0, mx = 0;
  for (int i = 0; i < k - 1; i++) {
    u = p[i];
    v = p[i + 1];
    int cnt = 0;
    for (int w : adj[u]) {
      if (dist[u] == dist[w] + 1) cnt++;
    }
    if (dist[u] == dist[v] + 1) {
      if (cnt > 1) {
        mx++;
      }
    } else {
      mn++;
      mx++;
    }
  }
  printf("%d %d\n", mn, mx);
  return 0;
}
