#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const int maxm = 1e6 + 10;
const long long mod = 998244353;
const int inf = 0x3ffffff;
const double eps = 1e-5;
struct Graph {
  int head[maxn], tot, next[maxn], to[maxn];
  void add(int u, int v) {
    tot++;
    to[tot] = v;
    next[tot] = head[u];
    head[u] = tot;
  }
} G1, G2;
int p[maxn], d[maxn];
bool vis[maxn];
void Dijkstra(int st) {
  priority_queue<pair<int, int> > q;
  q.push({0, st});
  fill(d, d + maxn, inf);
  d[st] = 0;
  while (!q.empty()) {
    pair<int, int> p = q.top();
    q.pop();
    int x = p.second;
    if (vis[x]) continue;
    vis[x] = 1;
    for (int i = G2.head[x]; i; i = G2.next[i]) {
      int y = G2.to[i];
      if (d[y] > d[x] + 1) {
        d[y] = d[x] + 1;
        q.push({-d[y], y});
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m, n, k;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    G1.add(u, v);
    G2.add(v, u);
  }
  cin >> k;
  for (int i = 0; i < k; i++) cin >> p[i];
  Dijkstra(p[k - 1]);
  int ansmx(0), ansmn(0);
  for (int i = 1; i < k; i++) {
    int id = p[i];
    int maybe = 2;
    for (int j = G1.head[p[i - 1]]; j; j = G1.next[j]) {
      int y = G1.to[j];
      if (y == id) continue;
      if (d[y] < d[id]) {
        maybe = 0;
        break;
      } else if (d[y] == d[id])
        maybe = 1;
    }
    if (maybe == 0)
      ansmx++, ansmn++;
    else if (maybe == 1)
      ansmx++;
  }
  cout << ansmn << " " << ansmx;
  return ~~(0 - 0);
}
