#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &in, vector<T> &arr) {
  for (auto &x : arr) in >> x;
  return in;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &arr) {
  for (auto &x : arr) out << x << ' ';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const set<T> &arr) {
  for (auto &x : arr) out << x << ' ';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const multiset<T> &arr) {
  for (auto &x : arr) out << x << ' ';
  return out;
}
template <typename T, typename D>
istream &operator>>(istream &in, pair<T, D> &p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T, typename D>
ostream &operator<<(ostream &out, const pair<T, D> &p) {
  out << p.first << ' ' << p.second;
  return out;
}
template <typename T, typename D>
istream &operator>>(istream &in, vector<pair<T, D> > &arr) {
  for (auto &p : arr) in >> p.first >> p.second;
  return in;
}
template <typename T, typename D>
ostream &operator<<(ostream &out, const vector<pair<T, D> > &arr) {
  for (auto &p : arr) out << p.first << ' ' << p.second << '\n';
  return out;
}
void IO() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const int64_t INF = 1e18;
const int int_INF = 1e9 + 13;
const long double PI = acos(-1);
const long double EPS = 1e-9;
const int64_t MOD = 1e9 + 7;
const int64_t MAXN = 2e5 + 13;
vector<int> bfs(int root, vector<vector<int> > &g) {
  queue<int> q;
  vector<bool> used((int)g.size(), false);
  vector<int> d((int)g.size(), 0);
  used[root] = true, q.push(root);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int v : g[u]) {
      if (!used[v]) {
        used[v] = true;
        d[v] = d[u] + 1;
        q.push(v);
      }
    }
  }
  return d;
}
void solve() {
  int n, m, k;
  cin >> n >> m;
  vector<vector<int> > g(n + 1), gr(n + 1);
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].emplace_back(v);
    gr[v].emplace_back(u);
  }
  cin >> k;
  vector<int> p(k);
  cin >> p;
  vector<int> d = bfs(p.back(), gr);
  int minimal = 0, maximal = 0;
  for (int i = 0; i < k - 1; ++i) {
    int u = p[i], v = p[i + 1], cur = 0;
    for (int w : g[u]) {
      if (d[w] == d[u] - 1) ++cur;
    }
    if (d[v] == d[u] - 1)
      --cur;
    else
      ++minimal, ++cur;
    maximal += bool(cur);
  }
  cout << minimal << ' ' << maximal << '\n';
}
void run() { solve(); }
signed main() {
  IO();
  run();
  return 0;
}
