#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
std::mt19937 rnd(
    std::chrono::high_resolution_clock::now().time_since_epoch().count());
const double PI = atan2(0.0, -1.0);
const int INF = 0x3f3f3f3f;
const ll LINF = (ll)2e18;
const int N = 200100;
std::vector<int> g[N], gr[N];
int path[N];
int d[N];
void bfs(int s) {
  memset(d, -1, sizeof(d));
  std::queue<int> q;
  d[s] = 0;
  q.push(s);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (auto to : gr[v]) {
      if (d[to] == -1) {
        d[to] = d[v] + 1;
        q.push(to);
      }
    }
  }
}
void run() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int from, to;
    scanf("%d%d", &from, &to);
    g[from - 1].push_back(to - 1);
    gr[to - 1].push_back(from - 1);
  }
  int k;
  scanf("%d", &k);
  for (int i = 0; i < k; ++i) {
    scanf("%d", &path[i]);
    --path[i];
  }
  int s = path[0];
  int t = path[k - 1];
  bfs(t);
  int min = 0, max = 0;
  for (int i = 1; i < k; ++i) {
    int prev = path[i - 1];
    int cur = path[i];
    if (d[prev] != d[cur] + 1) {
      ++min;
      ++max;
    } else {
      int cnt = 0;
      for (auto to : g[prev]) {
        if (d[prev] == d[to] + 1) {
          ++cnt;
        }
      }
      if (cnt > 1) {
        ++max;
      }
    }
  }
  printf("%d %d\n", min, max);
}
int main(void) {
  auto start = std::chrono::high_resolution_clock::now();
  run();
  auto end = std::chrono::high_resolution_clock::now();
  return 0;
}
