#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 2e5 + 5;
int path[maxn], tot;
int dist[maxn];
vector<int> vec[maxn];
vector<int> G[maxn];
void bfs(int start) {
  queue<pair<int, int> > q;
  q.push(make_pair(start, 0));
  while (!q.empty()) {
    pair<int, int> now = q.front();
    q.pop();
    int u = now.first, d = now.second;
    for (auto v : G[u]) {
      if (!dist[v] && v != start) q.push(make_pair(v, dist[v] = d + 1));
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int N, M;
  cin >> N >> M;
  for (int i = 1; i <= M; i++) {
    int u, v;
    cin >> u >> v;
    vec[u].push_back(v);
    G[v].push_back(u);
  }
  cin >> tot;
  for (int i = 1; i <= tot; i++) cin >> path[i];
  int end = path[tot];
  bfs(end);
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i <= tot - 2; i++) {
    int u = path[i], v = path[i + 1];
    int flag1 = 0, flag2 = 0;
    for (auto x : vec[u]) {
      if (x != v && dist[x] <= dist[v]) flag1 = 1;
      if (x != v && dist[x] < dist[v]) flag2 = 1;
    }
    ans2 += flag1;
    ans1 += flag2;
  }
  cout << ans1 << " " << ans2 << "\n";
  return 0;
}
