#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 50;
int head[maxn], n, m, Q, p[maxn];
struct Edge {
  int to, next, w;
} edge[maxn * 2];
int k = 1;
void add(int u, int v, int w) {
  edge[++k].to = v;
  edge[k].next = head[u];
  head[u] = k;
  edge[k].w = w;
}
int vis[maxn], dist[maxn];
void bfs() {
  dist[p[Q]] = 1;
  queue<int> q;
  q.push(p[Q]);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = head[x]; i; i = edge[i].next) {
      if (!dist[edge[i].to] && i % 2 == 1) {
        dist[edge[i].to] = dist[x] + edge[i].w;
        q.push(edge[i].to);
      }
    }
  }
}
int ans1 = 0, ans2 = 0;
void dfs1(int id) {
  if (id == Q) return;
  if (dist[p[id]] != dist[p[id + 1]] + 1) ans1++;
  dfs1(id + 1);
}
void dfs2(int id) {
  if (id == Q) return;
  if (dist[p[id]] != dist[p[id + 1]] + 1) {
    ans2++;
    dfs2(id + 1);
    return;
  }
  for (int i = head[p[id]]; i; i = edge[i].next) {
    if (i % 2 == 1) continue;
    if (edge[i].to != p[id + 1] && dist[edge[i].to] + 1 == dist[p[id]]) {
      ans2++;
      dfs2(id + 1);
      return;
    }
  }
  dfs2(id + 1);
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    add(u, v, 1);
    add(v, u, 1);
  }
  cin >> Q;
  for (int i = 1; i <= Q; i++) {
    cin >> p[i];
  }
  bfs();
  dfs1(1);
  dfs2(1);
  cout << ans1 << ' ' << ans2 << endl;
  return 0;
}
